Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Headers passed to ActiveStorageProvider don't make it to DirectUploadProvider

See original GitHub issue

I’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:closed
  • Created 5 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

CaptainLexingtoncommented, Feb 28, 2019

Wow, thank you so much!

cbothnercommented, Feb 28, 2019

Released as v0.8.0

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Post

No results found

github_iconTop Related Hashnode Post

No results found