Forum: Ruby on Rails Upload Text File into a string

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
Kyle M. (Guest)
on 2006-02-21 01:17
I'm trying to upload a text file from a form and read the file into a
string in my rails app. I've tried using @import_file =[:import_file]) as well as, but I need getting
"cannot convert StringIO into String" errors. Anyone have any ideas?

- Kyle
Richard Hart (Guest)
on 2006-02-21 01:28
(Received via mailing list)
Have you tried

@import_file = params['import_file'].read
This topic is locked and can not be replied to.