Wes Gamble
2006-Apr-03 22:15 UTC
[Rails] N file uploads from one post - one File, (N-1) StringIOs
All, Win XP Ruby 1.8.4 Rails 1.1 I have a multipart form that I am posting with a dynamic number of file_fields that are generated on it, say N. When I post this form and look at the form params, I see one "File" object and N-1 "StringIO" objects. It appears that I should be able to manipulate these the way that I would like (file-wise), so I think it''s not a problem. I''ve verified that regardless of the number of file fields N, if N > 1, then I will get a File object and (N-1) StringIO objects. Anyone know why I get the StringIO objects and why the first one is a File? I''ve looked at the CGI.rb docs and I see that StringIO and Tempfile are what''s expected. I just wanted to be sure that this was normal behavior. Thanks, Wes -- Posted via http://www.ruby-forum.com/.
Seemingly Similar Threads
- Multiple file uploads - only one file object gets posted
- POST op parameters are coming in as StringIOs
- StringIO - getting filename for multipart form uploads?
- Newbie: Can''t get file to upload
- Upload problem when file is small/StringIO (read method return nothing)