1
0
Fork 0
mirror of https://github.com/fog/fog.git synced 2022-11-09 13:51:43 -05:00

Merge pull request #3390 from fog/openstack_metadata

[openstack|storage] fixes around file metadata
This commit is contained in:
Wesley Beary 2015-01-12 10:27:36 -06:00
commit 8a8f9a366b

View file

@ -6,12 +6,13 @@ module Fog
class File < Fog::Model
identity :key, :aliases => 'name'
attribute :access_control_allow_origin, :aliases => ['Access-Control-Allow-Origin']
attribute :content_length, :aliases => ['bytes', 'Content-Length'], :type => :integer
attribute :content_type, :aliases => ['content_type', 'Content-Type']
attribute :content_disposition, :aliases => ['content_disposition', 'Content-Disposition']
attribute :etag, :aliases => ['hash', 'Etag']
attribute :last_modified, :aliases => ['last_modified', 'Last-Modified'], :type => :time
attribute :access_control_allow_origin, :aliases => ['Access-Control-Allow-Origin']
attribute :metadata
attribute :origin, :aliases => ['Origin']
def body
@ -47,7 +48,7 @@ module Fog
end
def metadata
@metadata ||= headers_to_metadata
attributes[:metadata] ||= headers_to_metadata
end
def owner=(new_owner)