You’re not receiving notifications from this thread.
Blog Posts with File Uploads using ActiveStorage & Amazon S3 Discussion
How did you get to the Policy section on AWS?
The first ARN success, but the second failed and get an error "Entered ARN is invalid."
"learning-path-blog/*" did i make typo?
Wah berarti nggak perlu pakai bahasa inggris nih 😁
Salam kenal, aku juga dari Indonesia
I simply added the object access one line below that (where it's explicitly about objects, not the bucket). Don't know if that's correct, but it works.
Can I ask how? Tried to follow but still stuck as to what to add - for context what I have in the permissions policy editor right now is:
I would like to confirm what I am thinking. Action Text works with active storage so since I didn't install active storage seperately but did it through action text, I believe my active storage is set for me and doesn't need further configuration should I want to be uploading only images for my application?
Would appreciate some help - when I set the active_storage.service to :local, I am able to reproduce the same results as Chris did. But not with the service pointing at :amazon. I have setup the AWS S3 bucket with the same settings and all the configurations on the codebase. This is the error I get on the browser console:
Access to XMLHttpRequest at 'https://juliano-gorails-blog.s3.amazonaws.com/.....' from origin 'http://localhost:3000' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource.
What caused this error for me were 2 things:
My localhost domain was different (localhost instead of 127.0.0.1). I also had to make sure it's not accidentally https locally, because there will be no ssl. I had to make sure to get this right in the CORS policy.
By default storage.yml names the bucket with the rails environment at the end (using some ERB). I kept it there, named my bucket "blabla-production" and of course got an error in "development" :P. Make sure your bucket name in storage.yml actually matches the name on S3.
Hello Chris and rails developers, for sure that was the most challenging part of this series of tutorials, In my case everything work as was explained but in production when I use render The image is uploaded but I can not see it. Maybe any idea about this problem.