Forum: Ruby on Rails Upload File Using Form

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
1e1cea593da7f39a1555e8ce5a9a42dc?d=identicon&s=25 Jason Hhh (jason955)
on 2008-12-16 07:14
I am trying to upload a CSV file through a form, process it, then input
the values in the file it into my database.  So first step, I need to
upload the file.  I created the form, uploaded a test file but I am
having trouble accessing the file in my controller.  I can access a hash
but all contains is the original filename of the file.  I guess my
question is how can I access this file and save it so that I can later
pass it to a CSV processing function.  I assume the file is uploaded to
some sort of temp file?  I am new at rails but I have accomplished
uploading and saving files in PHP before.  Any help would be great.

Thanks,

Jason
72eb65fa089082d3bd8b38a5596ad331?d=identicon&s=25 Keynan Pratt (keynan)
on 2008-12-16 09:06
see attachment_fu
This topic is locked and can not be replied to.