Carrierwave 将 Content-Type 设置为 Octet-Stream
我正在创建一个使用 Carrierwave & 的 Rails 3 应用程序。亚马逊S3。我遇到的问题是,当 Carrierwave 将图像上传到 Amazon 时,它将 Content-Type 设置为 Application/Octet-Stream,而不是实际的内容类型。
class ImageUploader < CarrierWave::Uploader::Base
include CarrierWave::MiniMagick
storage :fog
process :resize_to_limit => [100, 75]
process :convert => 'png'
end
I'm creating a Rails 3 Application that uses Carrierwave & Amazon S3. The Problem that I'm running into is that when Carrierwave uploads images to Amazon it's setting the Content-Type to Application/Octet-Stream instead of it's actual content type.
class ImageUploader < CarrierWave::Uploader::Base
include CarrierWave::MiniMagick
storage :fog
process :resize_to_limit => [100, 75]
process :convert => 'png'
end
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
来自 https://github.com/jnicklas/rierwave/issues/284#issuecomment-1925631 :
From https://github.com/jnicklas/carrierwave/issues/284#issuecomment-1925631: