replace file; add progress bar

When replace, delete previously uploaded file;
Note I'm using formdata in javascript which may not be supported by some
browsers.