mirror of
https://github.com/fog/fog.git
synced 2022-11-09 13:51:43 -05:00
[openstack|storage] fixes around file metadata
This commit is contained in:
parent
3b0a132ac7
commit
a1a08cb61b
1 changed files with 3 additions and 2 deletions
|
@ -6,12 +6,13 @@ module Fog
|
||||||
class File < Fog::Model
|
class File < Fog::Model
|
||||||
identity :key, :aliases => 'name'
|
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_length, :aliases => ['bytes', 'Content-Length'], :type => :integer
|
||||||
attribute :content_type, :aliases => ['content_type', 'Content-Type']
|
attribute :content_type, :aliases => ['content_type', 'Content-Type']
|
||||||
attribute :content_disposition, :aliases => ['content_disposition', 'Content-Disposition']
|
attribute :content_disposition, :aliases => ['content_disposition', 'Content-Disposition']
|
||||||
attribute :etag, :aliases => ['hash', 'Etag']
|
attribute :etag, :aliases => ['hash', 'Etag']
|
||||||
attribute :last_modified, :aliases => ['last_modified', 'Last-Modified'], :type => :time
|
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']
|
attribute :origin, :aliases => ['Origin']
|
||||||
|
|
||||||
def body
|
def body
|
||||||
|
@ -47,7 +48,7 @@ module Fog
|
||||||
end
|
end
|
||||||
|
|
||||||
def metadata
|
def metadata
|
||||||
@metadata ||= headers_to_metadata
|
attributes[:metadata] ||= headers_to_metadata
|
||||||
end
|
end
|
||||||
|
|
||||||
def owner=(new_owner)
|
def owner=(new_owner)
|
||||||
|
|
Loading…
Add table
Reference in a new issue