How to access uploaded files in Ruby

Posted by Jeff King on Stack Overflow See other posts from Stack Overflow or by Jeff King
Published on 2010-04-13T00:05:45Z Indexed on 2010/04/13 0:13 UTC
Read the original article Hit count: 745

Filed under:
|
|
|
|

I am trying use a Java Uploader in a ROR app (for its ease of uploading entire directories). The selected uploader comes with some PHP code that saves the files to the server. I am trying to translate this code to Ruby, but am stumped on this point:

PHP has a very convenient superglobal – $_FILES – that contains a hash of all files uploaded to the current script via the HTTP POST method. It appears Ruby does not have a similar resource. Lacking that, what is the best way to access and save the uploaded files?

I am using the JavaPowUpload uploader ( http://www.element-it.com/OnlineHelpJavaPowUpload/index.html ).

© Stack Overflow or respective owner

Related posts about ruby

Related posts about php