Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

send individual extradata with each file #88

Open
InnocentCivilian opened this issue Jan 1, 2019 · 4 comments
Open

send individual extradata with each file #88

InnocentCivilian opened this issue Jan 1, 2019 · 4 comments

Comments

@InnocentCivilian
Copy link

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?

@Dunki
Copy link

Dunki commented Feb 27, 2019

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

@dodistyo
Copy link

dodistyo commented Apr 4, 2019

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

@Dunki
Copy link

Dunki commented Apr 4, 2019

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.

@dodistyo
Copy link

dodistyo commented Apr 4, 2019

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
   };
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants