Report this

What is the reason for this report?

DO Spaces with React and Rails Active Storage direct upload 403 Forbidden error

Posted on September 18, 2018

I’m trying to direct upload to spaces from a ruby on rails api with a react SPA using Rails’ Active Storage and the S3 Service. I’m getting the following response from spaces when attempting to use a signed_url. Thanks in advance.

Response Headers: Request URL: https://{MyBucket}.nyc3.digitaloceanspaces.com/{REDACTED}?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential={REDACTED}%2F20180918%2Fnyc3%2Fs3%2Faws4_request&X-Amz-Date=20180918T205013Z&X-Amz-Expires=300&X-Amz-SignedHeaders=content-md5%3Bcontent-type%3Bhost&X-Amz-Signature={REDACTED} Request Method: OPTIONS Status Code: 403 Forbidden Remote Address: {ipAddress}:443 Referrer Policy: no-referrer-when-downgrade

Request Headers: Provisional headers are shown Access-Control-Request-Headers: content-md5,content-type Access-Control-Request-Method: PUT Origin: https://{REDACTED} Referer: https://{REDACTED User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3555.0 Safari/537.36

I’ve tried with and without CORS settings and using s3cmd I can read/write to the bucket fine. Please let me know if I need to provide any other information. Thanks!

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Start building today

From GPU-powered inference and Kubernetes to managed databases and storage, get everything you need to build, scale, and deploy intelligent applications.