1
0
Fork 0
mirror of https://github.com/fog/fog.git synced 2022-11-09 13:51:43 -05:00

[openstack|image] Fixes #1383

This commit is contained in:
Sergio Rubio 2012-12-18 11:58:09 +01:00
parent e2fbe1fc26
commit b11f509156

View file

@ -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?