Skip to content

Instantly share code, notes, and snippets.

@dahngeek
Created September 21, 2019 22:43
Show Gist options
  • Save dahngeek/09535bec1086813f8233f095aa058391 to your computer and use it in GitHub Desktop.
Save dahngeek/09535bec1086813f8233f095aa058391 to your computer and use it in GitHub Desktop.
ActiveStorage Google cloud Storage. Solution for CORS error, THE ERROR WAS THE FOLLOWING: Error storing "image.png". Status: 0
[
{
"origin": ["*"],
"responseHeader": ["Content-Type", "Content-Md5"],
"method": ["PUT", "GET", "HEAD", "DELETE"],
"maxAgeSeconds": 3600
}
]
You have to add the cors.json settings to your bucket, for that instal gsutils, choose your project and run
gsutil cors set cors.json gs://<bucket>
Verify with
gsutil cors get gs://<bucket>
SOURCE: https://github.com/rails/rails/issues/31523
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment