[aws|storage] pass content_type through model correctly

This commit is contained in:
geemus 2010-11-01 11:01:45 -07:00
parent f0fd80b52b
commit a31c1902f1
2 changed files with 6 additions and 0 deletions

View File

@ -76,6 +76,9 @@ module Fog
if @acl if @acl
options['x-amz-acl'] ||= @acl options['x-amz-acl'] ||= @acl
end end
if content_type
options['Content-Type'] = content_type
end
data = connection.put_object(directory.key, @key, @body, options) data = connection.put_object(directory.key, @key, @body, options)
@etag = data.headers['ETag'] @etag = data.headers['ETag']
true true

View File

@ -79,6 +79,9 @@ module Fog
if @acl if @acl
options['x-amz-acl'] ||= @acl options['x-amz-acl'] ||= @acl
end end
if content_type
options['Content-Type'] = content_type
end
data = connection.put_object(directory.key, @key, @body, options) data = connection.put_object(directory.key, @key, @body, options)
@etag = data.headers['ETag'] @etag = data.headers['ETag']
true true