From: Vandemoortele Simon Date: 2002-12-22T05:24:33+09:00 Subject: Howto write an image upload CGI script ? Hello everyone, being new to ruby _and_ CGI scripting I'm having some trouble writing an upload script. Maybe someone can give me a few pointers. I have a _working .rbx_ that goes like this: cgi = CGI.new file = cgi['file'] `cp -v #{file[0].local_path.untaint} \ /targetdirectory/#{file[0].original_filename.untaint }` _Problems:_ 1) I don't like using `` without a good reason, how do I do this the ruby way ? 2) What I'd *really* like is a script that would be able to upload *several files at once*. I've heard this is not an easy task; suggestions ? 3) Is there a way to have apache write the file straight to the target directory so I don't have to make a copy at all ? Thank you for your time, Simon PS: If you are concerned about security problems in my script: it is only meant to be used by me inside my private network. -- In the first place, God made idiots; this was for practice; then he made school boards. -- Mark Twain