mirror of
https://github.com/fog/fog.git
synced 2022-11-09 13:51:43 -05:00
[aws|storage] Make Files#get consistent with Directory#files
- etag: drop quotes - content-length: parse to Numeric - last-modified: parse to Time
This commit is contained in:
parent
eff1990db0
commit
e6a4085342
1 changed files with 3 additions and 0 deletions
|
@ -46,6 +46,9 @@ module Fog
|
||||||
:body => data.body,
|
:body => data.body,
|
||||||
:key => key
|
:key => key
|
||||||
})
|
})
|
||||||
|
file_data['Last-Modified'] = Time.parse(file_data['Last-Modified'])
|
||||||
|
file_data['ETag'].gsub!('"','')
|
||||||
|
file_data['Content-Length'] = file_data['Content-Length'].to_i
|
||||||
new(file_data)
|
new(file_data)
|
||||||
rescue Excon::Errors::NotFound
|
rescue Excon::Errors::NotFound
|
||||||
nil
|
nil
|
||||||
|
|
Loading…
Add table
Reference in a new issue