the HTTP interceptor not intercepting the file upload calls from the nervgh/angular-file-upload , how can intercept those calls.
I am adding HTTP authentication Headers to all my api calls, But these angular file upload calls are not intercepted and authentication headers are not added to these calls.
It may be because the up-loader doesn't use the $http service.
It uses native javascript xhr object. Maybe in the future the $http service will be supported. For now, you'll have to add the authorization headers in the up-loader directly:
var uploader = new FileUploader();
uploader.headers["Authorization"] = "Bearer " + tokenInfo.accessToken;
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With