【发布时间】:2019-12-27 17:12:59
【问题描述】:
通过回形针,我能够为 S3 指定服务器端加密,还可以像这样指定内容类型(对于不稳定的文件):
has_attached_file :attachment,
s3_permissions: :private,
s3_server_side_encryption: 'AES256',
s3_headers: lambda { |attachment|
{
'content-Type' => 'text/csv; charset=utf-16le'
}
}
在 ActiveStorage 中使用 has_attached_one 时,我会在哪里指定类似的内容?
【问题讨论】:
标签: ruby-on-rails rails-activestorage