I've searched through wiki but couldn't find an answer where should I put my additional headers (for example Authorization
header) in JS script? Somewhere onSend
/beforeSend
or?
Widget link: https://github.com/blueimp/jQuery-File-Upload
I've searched through wiki but couldn't find an answer where should I put my additional headers (for example Authorization
header) in JS script? Somewhere onSend
/beforeSend
or?
Widget link: https://github.com/blueimp/jQuery-File-Upload
The answer is quiet simple : just add your custom headers in add section
or in the initialisation :
Try something like this..
Here is my implementation
Did you try to set additional headers through "options.headers" object?
If using the forceIframeTransport: true option (with IE not supporting XHR file uploads you need to fall back on the hidden iframe approach), then modifying headers is not an option: https://github.com/blueimp/jQuery-File-Upload/issues/654
Options.headers: http://api.jquery.com/jQuery.ajax/
This is how I added the filename as a header: