lazy load s3 file bodies
This commit is contained in:
parent
20ad3ea834
commit
9a4d1e4778
|
@ -15,6 +15,14 @@ module Fog
|
|||
attribute :size, 'Size'
|
||||
attribute :storage_class, 'StorageClass'
|
||||
|
||||
def body
|
||||
@body ||= if last_modified
|
||||
collection.get(identity).body
|
||||
else
|
||||
''
|
||||
end
|
||||
end
|
||||
|
||||
def directory
|
||||
@directory
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue