1
0
mirror of https://github.com/OpenNebula/one.git synced 2025-03-21 14:50:08 +03:00

Bug: pass file object to occi.post_compute method

This commit is contained in:
Ruben S. Montero 2012-02-14 13:04:11 +01:00
parent 0652b11c29
commit d0c6453c9b

View File

@ -367,9 +367,12 @@ end
post '/ui/upload' do
file = Tempfile.new('uploaded_image')
FileUtils.cp(request.env['rack.input'].path,file.path)
request.params['file'] = file.path #so we can re-use occi post_storage()
FileUtils.cp(request.env['rack.input'].path, file.path)
#so we can re-use occi post_storage()
request.params['file'] = {:tempfile => file}
result,rc = @occi_server.post_storage(request)
treat_response(result,rc)
end