update index.html
cleanup upload function