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
Родитель 3b0a132ac7 a1a08cb61b
Коммит 8a8f9a366b
1 изменённых файлов: 3 добавлений и 2 удалений

Просмотреть файл

@ -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)