From: Robert Dober Date: 2007-08-10T01:17:13+09:00 Subject: Re: WEBRick: Problem to get the multipart/form-data decoded correctly. On 8/9/07, Arlen Christian Mart Cuss wrote: > > > Here is the problem: > > > > I am uploading files to my Webrick server via the standard HTTP method: > >
> >
> > > > the Webrick do_POST handler than has the multipart/form-data in his req.body. > > > > As astonishing as that sounds, I have not found a way to get the > > file's content out of this. > > I am sure there should be an easy way. > > Here's something I found from Google. It may not be definitive, sorry, > but I think it can help! > > http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/94785 That was indeed one of my first hits and it was useful to get the form right, please note however that he is not doing anything with the uploaded data :(, just sending it back. And this exactly where it hurts, I cannot glue the received data (req.body) into CGI, which would seem to do the multipart/form-data conversion just fine. Actually I would not care to save the body as such into a file and have an external converter do the job(1), if I only had such an external converer :(. Thx anyway Robert (1) even if not in Ruby, sorry for the OL in that case. > > Arle. > > > -- [...] as simple as possible, but no simpler. -- Attributed to Albert Einstein