How to upload custom S3 metadata with Carrierwave

微笑、不失礼 提交于 2019-12-04 14:37:22

You can set attributes either globally in your Carrierwave config -

CarrierWave.configure do |config|
  config.fog_attributes = {'Content-Disposition' => ...}
end

or you can define it on the uploader class itself

def fog_attributes
  {'Content-Disposition' => ...}
end

and the method on the uploader can use data accessible to the uploader to determine the appropriate return value for fog_attributes

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!