Javascript for uploading files.