vue-clip
vue-clip copied to clipboard
File name manipulation and associating it with input data
How do we manipulate the file name , so that we can save it as a unique file and associate it with user data. If this is possible then I can change the file name according to user input parameter or id , and link user inputs to the file.
Use the Dropzone.js config options found here: http://www.dropzonejs.com/#config-renameFile
Thanks Alexsasharegan, looks like i have solved the issue, by generating some random characters in my PHP backend then replacing the default client file name and echoing the file path as my custom response, then I accessed it from file.xhrResponse.response in on-complete and emitted it to the form as an input.
I believe you can also add dynamic query params to the underlying Dropzone xhr, so you could always use that to work out a dynamic filename. Not sure if it's relevant, but I recommend using uuid's for file storage if your target is a filesystem.
Glad to hear you got something worked out!
Thank you very much Alexsasharegan, let me look at your recommendations.
Here are the params: http://www.dropzonejs.com/#config-params