Renaming a File() object in JavaScript
I'd like for my users to be able to re-name a file before uploading it. I have a File object in Javascript which has a name property that is already set, but i'd like for this to be able to be updated. Right now doing the obvious myFile.name = "new-name.txt" returns an error that this property is read only. What's the best way of changing the name property on a JavaScript File object? You can add an input tag with the name on it and hide the name property from the user. On the server, just use the input as the name and ignore the default name. Now that file.name is a read-only property, I've