Jonathan del Strother
2006-May-24 10:21 UTC
[Rails] POST op parameters are coming in as StringIOs
I''m receiving a multipart post request from another server. The request parameters are being received as StringIOs, rather than plain strings. For instance : Processing MessagesController#receive (for 83.166.68.31 at 2006-05-24 10:36:53) [POST] Session ID: eedafb24033be0714f8133f02810083f Parameters: {"message"=>#<StringIO:0xb7503358>, "date"=>#<StringIO: 0xb7501f30>, "from"=>#<StringIO:0xb7502944>, "type"=>#<StringIO: 0xb7503d6c>, "action"=>"receive", "id"=>#<StringIO:0xb750151c>, "to"=>#<StringIO:0xb75047bc>, "controller"=>"messages"} If I try to get the actual parameter with (for instance) params [:message].read, it works as expected...but surely this shouldn''t be necessary? Any idea why this is happening? I''m out of ideas...any help would be massively appreciated. Jon
Apparently Analagous Threads
- N file uploads from one post - one File, (N-1) StringIOs
- Upload problem when file is small/StringIO (read method return nothing)
- StringIO - getting filename for multipart form uploads?
- Upload problem when file is small/StringIO
- Icalendar.Parse(StringIO.new(aString)) complains about missing method, bytesize