使用其他s3(FIPS)端点设置Paperclip

我需要使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/

任何帮助将不胜感激

zhuzhu1107 回答:使用其他s3(FIPS)端点设置Paperclip

暂时没有好的解决方案,如果你有好的解决方案,请发邮件至:iooj@foxmail.com
本文链接:https://www.f2er.com/3155054.html

大家都在问