Update app.js for uploading file with ajax