Reputation: 14586
I'm implementing a file-uploading service using blueimp's jQuery-File-Upload plugin.
I need to attach an authentication-token to each post. How can this be achieved?
My code (simplified a bit):
HTML:
<div class="dropzone">
<input style="display:none;" id="fileupload" type="file" name="file" data-url="http://192.168.99.100/api/classify" multiple>
</div>
Javascript:
var auth_token = {"auth_token": "blablablabla"};
$(document).ready(function(){
$('#fileupload').fileupload({
dropZone: $(".dropzone")});
});
Upvotes: 0
Views: 44