我需要使Paperclip与其他FIPS端点配合使用。但是似乎无法将默认值从s3
更改为s3-fips
。
我尝试查看https://www.rubydoc.info/gems/paperclip/Paperclip/Storage/S3和相关资料。并使用了url
+ s3_host_name
+ s3_options
endpoint = "https://s3-fips.#{configatron.s3.region!}.amazonaws.com"
PAPERCLIP_OPTIONS ||=
{
storage: :s3,s3_credentials: "#{Rails.root}/config/s3.yml",s3_region: configatron.s3.region!,s3_protocol: "https",s3_permissions: "private",s3_host_alias: "dev.projects.com",s3_server_side_encryption: "AES256",url: endpoint,# This doesn't seem to have any effect
s3_host_name: endpoint,# This seem to only change the local path?
s3_options: { # This doesn't seem to have any effect
"endpoint" => endpoint
}
}.freeze
我正在通过触发expiring_url
的{{1}}进行测试,但是它始终显示
paperclip attachment
而不是
https://bucket-name.s3.us-west-2.amazonaws.com/
任何帮助将不胜感激