uploader icon indicating copy to clipboard operation
uploader copied to clipboard

send individual extradata with each file

Open InnocentCivilian opened this issue 5 years ago • 4 comments

hey guys, I'm using queue with start/stop button in my upload page and I'm trying to send individual extradata for each file but as I start the queue extra data of all files are the one I chose in the last file. I tried multiple: false, extFilter: ['jpg', 'jpeg', 'png', 'gif'], extraData: function () { return { "foo": $("#foo").val(), "bar": $("#bar").val() }; } , or even: onNewFile: function (id, file) { ..... $('#drag-and-drop-zone').data('dmUploader').settings.extraData = { "foo": $("#foo").val(), "bar": $("#bar").val() }; ....... } and so far i still recieve all files with last file extradata in my server-side Any idea how this task can be done?

InnocentCivilian avatar Jan 01 '19 00:01 InnocentCivilian

Do you have a solution already? I like to know this too. @danielm

Dunki avatar Feb 27 '19 08:02 Dunki

any update ? i need to work on this too @InnocentCivilian @Dunki

dodistyo avatar Apr 04 '19 04:04 dodistyo

Sadly i got no response on my question through Github and direct contact. In the end i used Dropzone.js and could complete my project.

Dunki avatar Apr 04 '19 07:04 Dunki

Sadly i got no response on my question through Github and direct contact. In the end i used Dropzone.js and could complete my project.

apparently, it's too late to change plugin lol, in case you need it. in order to set dynamic extradata, i solve it using this :

// Example
extraData: function(id) {
   return {
     "file_id": id
   };
}

dodistyo avatar Apr 04 '19 08:04 dodistyo