move update handling function to handle-update.js
move file(picture) upload handling function here