Closed JohnMcAvinue closed 9 years ago
Hi @JohnMcAvinue , while maintainer not merged my pull request, you can download SimpleAjaxUploader.js from my fork:
var uploader = new ss.SimpleUpload({
button: 'upload-btn',
url: '/PathTo/UploadHandler',
name: 'uploadfile',
// add the following new option:
encodeCustomHeaders: false
});
Please note, that only the main not-minified file (SimpleAjaxUploader.js) is patched, while SimpleAjaxUploader.min.js - is not!
Thanks very much. I ended up removing the encoding myself but it's obviously better to have it based on a setting. I appreciate you sharing it, thanks!
I'm using Bearer authentication and need to pass an authorisation token in the header in the format "Bearer AuthTokenValue".
I'm setting the customHeaders like this:
customHeaders: { "Authorization": "Bearer " + self.Parent().accessToken() },
This results in the following being sent:
Bearer%205MZVwIi9E3-J
It should be:
Bearer 5MZVwIi9E3-J
Is there a way to prevent this encoding from happening?
Thanks