mirror of
https://github.com/fog/fog.git
synced 2022-11-09 13:51:43 -05:00
Merge pull request #1388 from rubiojr/ruby-187-compat-fix
[openstack|image] Fixes #1383
This commit is contained in:
commit
1450a637f0
1 changed files with 3 additions and 1 deletions
|
@ -16,11 +16,13 @@ module Fog
|
|||
'x-image-meta-checksum' => attributes[:checksum],
|
||||
'x-image-meta-owner' => attributes[:owner],
|
||||
'x-glance-api-copy-from' => attributes[:copy_from]
|
||||
}
|
||||
}.reject { |k,v| v.nil? }
|
||||
|
||||
body = String.new
|
||||
if attributes[:location]
|
||||
body = File.open(attributes[:location], "rb")
|
||||
# Make sure the image file size is always present
|
||||
data['x-image-meta-size'] = File.size(body)
|
||||
end
|
||||
|
||||
unless attributes[:properties].nil?
|
||||
|
|
Loading…
Reference in a new issue