Robert Dober
8/10/2007 8:07:00 AM
On 8/10/07, Pit Capitain <pit.capitain@gmail.com> wrote:
> 2007/8/9, Robert Dober <robert.dober@gmail.com>:
> > I have to admit that I feel this is a stupid question, but two days of
> > Web search(1) and trials with WEBRick and CGI did not bring me any
> > closer. (...)
>
> Bonsoir Robert.
>
> Google didn't help me either, but I'm using a Ruby wiki called "Soks",
> which runs on WEBrick and offers file uploads. Reading the code it
> seems that the following should work:
>
> upload_data = request.query["data"]
> File.open(upload_data.filename, "wb") do |file|
> upload_data.each_data do |data|
> file << data.to_s
> end
> end
>
> Take a look at WEBrick::HTTPUtils::FormData.
>
> I haven't tested it, but I HTH.
>
> Regards,
> Pit
I knew it would be simple, but that simple!!!
Works like charm.
Merci beaucoup Pit, meine Dankbarkeit wird Dir für immer nachschleifen
(sorry folks for these old Viennese saying ;)
Robert
>
--
[...] as simple as possible, but no simpler.
-- Attributed to Albert Einstein