зеркало из https://github.com/github/fog.git
Merge pull request #3390 from fog/openstack_metadata
[openstack|storage] fixes around file metadata
This commit is contained in:
Коммит
8a8f9a366b
|
@ -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)
|
||||
|
|
Загрузка…
Ссылка в новой задаче