If you have a Google account, you can save this code to your Google Drive.
Google will ask you to confirm Google Drive access.
Save file as:
If you have saved a file to Google Drive, you can open it here:
Submit the form to see the value of the name attribute of the FileUpload object (you must upload a file, or else nothing is returned).
Click the "Try it" button to change the name from "filename" to "newFileName".