cleanup upload.js