I want to add file description for every file which will be uploaded. How can I do that. Somebody has demo? Please help me, Thanks
-
Possible duplicate of [How to add text input to dropzone upload](http://stackoverflow.com/questions/20391134/how-to-add-text-input-to-dropzone-upload) – Benji Oct 13 '16 at 01:47
-
This looks to be a duplicate of [this question](http://stackoverflow.com/q/20391134/401980) and there's a pretty good answer. It may also be a good example of how to ask a question… *wink wink* – Benji Oct 13 '16 at 01:48
3 Answers
I would add a handler on "processing" that provides a popup and you can use that answer for each file as it is about to upload.
The challenge with any questions on dropzone or any ajax file upload project is that there is a need to differentiate if you want the additional info to be sent to the ajax call that uploads the file or to the client process that is handling the calling of the uploads.
What do you plan on doing with the Descriptions?

- 514
- 3
- 4
I did have the same problem like you and the processing is simple if you change the process approach.
When the user uploads a file, you could insert that file information (id, filename, hash) into the database and mark them with a field to be updated later (e.g. need_update?). After done uploading the files, redirect to a method that list records that contains need_update being TRUE, and then update other fields of records (e.g. title, description, tags).
That's pretty straight forward to a media uploading system.
Good luck.

- 2,265
- 1
- 23
- 28

- 1,005
- 12
- 13
If I understand your question, from my experience, you can listen to "sending" event, which passes the formData where you can do formData.append("description", your description). This will submit your upload with the formData. Each file being uploaded can have different description.
init: function() {
this.on("sending", function(file, xhr, formData) {
formData.append("name", "value"); // Append all the additional input data of your form here!
});
}

- 1,520
- 2
- 23
- 39