We're currently using Active Storage to upload avatar images to Amazon S3 which is working great on local as well as production
class User < ApplicationRecord
has_one_attached :avatar
end
I'm now trying to use Action Text and followed the directions on Rails Guides which is working perfectly on localhost
class Course < ApplicationRecord
belongs_to :user
has_rich_text :content
end
When I deploy to production, however, the rich text formatting works but attachments are not being uploaded to S3 which surprised me since I assumed it's using the same active storage credentials that we used for the avatar image uploads. Strangely it's populating the active_storage_blobs
table with the filenames even though they are not being uploaded or being referenced by active_storage_attachments
.
Could someone help?
Turns out the default is direct uploads in Action Text (unlike Active Storage attachments) and it works after setting up CORS on S3