Commit aebbb7c4 by Jon Yurek

S3 uploads should have their content types set

parent f756dd1d
......@@ -165,7 +165,7 @@ module Paperclip
logger.info("[paperclip] -> #{path(style)}")
key = s3_bucket.key(path(style))
key.data = file
key.put(nil, @s3_permissions)
key.put(nil, @s3_permissions, {'Content-type' => instance_read(:content_type)})
rescue RightAws::AwsError => e
raise
end
......
......@@ -97,7 +97,7 @@ class StorageTest < Test::Unit::TestCase
@key_mock = stub
@bucket_mock.expects(:key).returns(@key_mock)
@key_mock.expects(:data=)
@key_mock.expects(:put)
@key_mock.expects(:put).with(nil, 'public-read', 'Content-type' => 'image/png')
@dummy.save
end
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment