I have dropzone set-up and working with my AWS S3 account. However I want to be able to rename the file before it is sent to S3 (append with timestamp for example) so that a file uploaded with the same name as an existing file will not get overwritten. I've tried to catch this at the sending event and to update the file name at this point but without success:
this.on("sending", function(file) {
file.name = 'my-new-prefix-' + file.name;
});
Any ideas where I am going wrong or why this isn't working?
Also have raised this earlier at - https://github.com/enyo/dropzone/issues/345
I currently use FromData() - Dropzone.js which allows you to send custom data.
I know this is not exactly what is your question, it is only a temporary solution without modifying the source code
You can also pass object directly in options: