我们目前正在使用 Active Storage 将头像图像上传到 Amazon S3,这在本地和生产环境中都表现出色
class User < ApplicationRecord
has_one_attached :avatar
end
我现在正在尝试使用 Action Text 并遵循Rails Guides上的说明,该说明在 localhost 上运行良好
class Course < ApplicationRecord
belongs_to :user
has_rich_text :content
end
然而,当我部署到生产环境时,富文本格式有效,但附件没有上传到 S3,这让我感到惊讶,因为我认为它使用的活动存储凭证与我们用于上传头像图像的活动存储凭证相同。奇怪的是,它active_storage_blobs
使用文件名填充表,即使它们没有被上传或被active_storage_attachments
.
有人可以帮忙吗?