Issue with AngularJS 1.4 and transformRequest and uploading to S3
See original GitHub issueI have an issue today when I updated my project from Angular 1.3 to 1.4, and it’s probably because now you can’t modify the request header with transformRequest anymore (or at least according to this article). Essentially before I was calling the upload function with these parameters:
url: my-bucket-url,
headers: {'Content-Type': file.type},
method: 'POST',
transformRequest: function (data, headersGetter) {
// Headers change here
var headers = headersGetter();
delete headers.Authorization;
return data;
},
fields: fieldsData,
...
As I had to remove the Authorization token from the header I had to transform my headers before sending the file to S3. But now I see that the Authorization is not getting removed from the headers. Any idea how to fix it? Did anybody test ng-file-upload with Angular 1.4?
Issue Analytics
- State:
- Created 8 years ago
- Comments:12 (4 by maintainers)
Top Results From Across the Web
Can't upload files to Amazon S3 using Angularjs with pre ...
When the client uploads a file, it first retrieves a pre-signed URL and then uses this to upload the file directly to my...
Read more >Upload to Amazon S3 using AngularJS | ryansouthgate.com
Hi ryansouthgate,. I am facing issue in uploading video file in amazon s3. Its giving me "Uncaught ReferenceError: cosole is not defined" error ......
Read more >react-aws-s3 - npm
Open Source Module to Upload your Media and files into AWS S3 Bucket directly from Front-end React.. Latest version: 1.5.0, last published: ...
Read more >Uploading To S3 With AngularJS - Cheyne Wallace
A problem which is especially visible when using services like Heroku. Step 1: Add The AWS JS SDK To Your Project. This is...
Read more >Uploading a File to Amazon S3 Using HTTP POST
The topic uses the example policy and fictitious credentials to show you the workflow and resulting signature and policy hash. You can use...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@danialfarid I suggest closing this.
We are having an issue with angular transform request and ADDING a header. This is a deprecation since angular 1.2.x which we upgraded from.