Simple JS uploading logic (sketch).