Quoting Daniel Molina ([email protected]): > On 28 November 2013 18:15, Stefan Kooman <[email protected]> wrote: > > > Quoting Daniel Molina ([email protected]): > > > On 27 November 2013 21:27, Stefan Kooman <[email protected]> wrote: > > > > > > > > > We didn't change anything, just: > > > > > https://github.com/OpenNebula/one/commit/f8e2e65b0170268e9c72d52c4fe9f0e13fa05acd > > > > > > So, it should work as before. > > > > Passenger 4.0.26 is giving me this error (500): > > > > [ 2013-11-28 17:34:07.3852 19823/7f177e5a6700 > > Pool2/Implementation.cpp:1291 ]: [App 19906 stderr] NameError - > > uninitialized constant PhusionPassenger::Utils::RewindableInput: > > [ 2013-11-28 17:34:07.3858 19823/7f177e5a6700 > > Pool2/Implementation.cpp:1291 ]: [App 19906 stderr] > > /usr/lib/one/sunstone/sunstone-server.rb:412:in `block in <top (required)>' > > > > Image upload _is_ working with Apache Passenger 3.0.13debian-1.2. > > Apparently > > passenger 4.x needs this class to be handled differently. > > > > Could you check what it the value of rackinput.class in the "post '/upload' > do" method of sunstone-server.rb. You can add a > logger.error(rackinput.class) and it will be reported in the log.
##############################################################################
# Upload image
##############################################################################
post '/upload'do
tmpfile = nil
rackinput = request.env['rack.input']
if (rackinput.class == Tempfile)
tmpfile = rackinput
elsif (rackinput.class == StringIO || rackinput.class ==
PhusionPassenger::Utils::RewindableInput)
tmpfile = Tempfile.open('sunstone-upload', '/mnt/sunstone_upload')
tmpfile.write rackinput.read
tmpfile.flush
else
logger.error { "Unexpected rackinput class #{rackinput.class}" }
logger.error(rackinput.class)
return [500, ""]
end
@SunstoneServer.upload(params[:img], tmpfile.path)
end
I included logger.error(rackinput.class) like above. But I can't find
the rackinput.class value. Is the above correct?
Gr. Stefan
--
| BIT BV http://www.bit.nl/ Kamer van Koophandel 09090351
| GPG: 0xD14839C6 +31 318 648 688 / [email protected]
signature.asc
Description: Digital signature
_______________________________________________ Users mailing list [email protected] http://lists.opennebula.org/listinfo.cgi/users-opennebula.org
