move upload page initialization to common.js