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.
5dd60445347fc3dec62474cc732fef0d?d=identicon&s=25 Kyle Mathews (kylemathews)
on 2006-02-21 00: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
E637601d734376a9ac9f64606e56dc92?d=identicon&s=25 Richard Hart (Guest)
on 2006-02-21 00:28
(Received via mailing list)
Have you tried

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