Specify Name for Uploaded File At Upload Time Using DropZone.js
Background: After surmounting my last challenge with dropzone.js and was able to upload my files. I was immediately faced with another one. The dropzone.js implementation apparently doesn't include any method for computing a value to send to the server while the file is being uploaded. What this means is that any headers or form data used to initialize the dropzone will be used repeatedly each time a file is uploaded. Issue: This meant that, for instance if I didn't want to upload a file using its name from the client, I may not be able to specify another name for the file as it is being uploaded. And that was exactly what I was faced with. Each time I created another record and uploaded a corresponding file with the dropzone, the file would overwrite my previous files, because I was apparently sending the same custom filename to the server to save my files with. My dropzone initialization code looked like this var mydropzone = $(targetelement).dropzone({ ...