How to access downloadable files in Ruby
I am trying to use Java Uploader in a ROR application (for ease of downloading all directories). The uploader of choice comes with some PHP code that stores the files on the server. I am trying to translate this code to Ruby, but at the moment I don't understand:
PHP has a very handy superglobal - $ _FILES - which contains a hash of all files uploaded to the current script using the HTTP POST method. It looks like Ruby doesn't have a similar resource. Lack of this, what is the best way to access and save downloaded files?
I am using the JavaPowUpload downloader ( http://www.element-it.com/OnlineHelpJavaPowUpload/index.html ).
a source to share
ruby on rails allows you to use the application root to access a file stored (wherever you choose it) via # {RAILS_ROOT}.
This tutorial will open . Not the prettiest method, but it should give you an idea of what needs to be done. Once the file is uploaded, it's just a matter of getting the correct path and doing your processing from there.
a source to share