1
0
mirror of https://github.com/OpenNebula/one.git synced 2025-02-22 17:57:46 +03:00

OCCI upload file accepts xml sent as a file

This commit is contained in:
Javi Fontan 2010-09-02 15:45:37 +02:00
parent 70290e00e1
commit 3b9a62f576

View File

@ -311,10 +311,13 @@ class OCCIServer < CloudServer
end
# --- Create and Add the new Image ---
occixml = request.params['occixml']
occixml = occixml[:tempfile].read if occixml.class == Hash
image = ImageOCCI.new(
Image.build_xml,
get_client(request.env),
request.params['occixml'])
occixml)
rc = add_image(image, request.params['file'])
return rc, 500 if OpenNebula.is_error?(rc)