I'm using Dropzone.js to handle uploading of files. I would really like to be able to modify the original name of the file before uploading it to S3. It would be nice to just be able to use dropzone's processing file hook like shown below, but it appears none of the changes I make to this file object persist...
myDropone.on('processingfile', function(file) {
console.log(file.name) // 'Randy.png'
file.name = 'my-custom-name.png';
console.log(file.name) // 'Randy.png'
});
Even when trying to modify this File object in the console changes do not persist. I'm losing my mind...
Does anyone see what I'm missing here? Or is there a better way to modify the name of a file before uploading it with Dropzone?