main.js: fix file uploading.