23 / resumable.js

A JavaScript library for providing multiple simultaneous, stable, fault-tolerant and resumable/restartable uploads via the HTML5 File API.
MIT License
4.67k stars 611 forks source link

Dynamic query for each file. #517

Closed TomasRezende closed 5 years ago

TomasRezende commented 5 years ago

Hi, I'm trying to send a unique verification token for each file I upload.

Currently I'm passing the verification token on query parameter when I create Resumable instance (ex.: var r = new Resumable({ target: '{{ target}}', query:{verification_token: '{{ token }}'}, prioritizeFirstAndLastChunk: false, simultaneousUploads: 1, ...). The problem is that if multiple files are added, every file will have the same token.

Is there an easy way to set an individual token parameter on query for each file that will be sent?

Thanks , Tomas

steffentchr commented 5 years ago

Sure, you can have {query:function(){...}} and do whatever.