Headers passed to ActiveStorageProvider don't make it to DirectUploadProvider
See original GitHub issueI’ve been passing a headers
prop to ActiveStorageProvider
, but the request to direct_upload
doesn’t have those headers. When I put a breakpoint in addHeaders
in Upload.js
, this.options.headers
is undefined
- but when I put that breakpoint in ActiveStorageProvider
’s render
method in index.js
, headers
has the correct value when it’s destructured on line 51 - it’s just not passed down or used anywhere. Is this the desired behavior? The documentation is not clear.
Issue Analytics
- State:
- Created 5 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
Active Storage Overview - Rails Edge Guides
Configure CORS on third-party storage services to allow direct upload requests. That's it! Uploads begin upon form submission. 9.2 Cross-Origin Resource Sharing ...
Read more >Rails 6.0 ActiveStorage direct upload : wrong Request URL in ...
I have put direct_uploads in javascript/utils. in application.js I have add : import * as ActiveStorage from "activestorage"; import ".
Read more >Tutorial: Upload Files with Rails Active Storage and react ...
Consume API from React components. We're going to use axios library to make requests to the backend and create React component from scratch....
Read more >react-activestorage-provider@0.8.0 - runpkg
make the exports object identical to regeneratorRuntime. module.exports = runtime;. } // Don't bother evaluating the rest of this file if the runtime...
Read more >How to Implement direct-upload in a Rails API
And this is the AWS PUT request (don't forget to include the headers):. The last step is to attach the blob (record created...
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 Free
Top 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
Wow, thank you so much!
Released as v0.8.0