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:
parent
70290e00e1
commit
3b9a62f576
@ -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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user