Brian Casel
Joined
110 Experience
1 Lesson Completed
0 Questions Solved
Activity
What a great addition to Rails. Thanks for documenting it Chris!
In case this helps anyone (I had a hell of time troubleshooting this):
I ran into a really frustrating issue when I pushed to Heroku. Rich text (trix) with image uploading was all working fine locally, but on Heroku dropped-in images weren't saving, and the issue had to do with my using Amazon S3.
Turns out it was a CORS issue, which Chris made a video about here:
https://gorails.com/episodes/cross-origin-resource-sharing-with-rails?autoplay=1
In addition to that, I had to set my CORS configuration in my S3 bucket settings. This was the configuration that ended working for me:
<CORSConfiguration xmlns="http://s3.amazonaws.com/doc/2006-03-01/">
<CORSRule>
<AllowedOrigin>*</AllowedOrigin>
<AllowedMethod>GET</AllowedMethod>
<AllowedMethod>POST</AllowedMethod>
<AllowedMethod>PUT</AllowedMethod>
<AllowedHeader>*</AllowedHeader>
</CORSRule>
</CORSConfiguration>