On Nov 14, 2007, at 9:29 AM, João Paulo Lins wrote:
>   This code working for all versions and all sizes file
>
>     if params[:upload_file].instance_of?(StringIO)
>        a = parser(params[:upload_file])
>     else
>        a = parser(params[:upload_file].open)
>     end

Perhaps I'm missing something, but what is wrong with this?

   a = parser(params[:upload_file].read)

That already works in both cases. There's no need to open a Tempfile.

--
Jonathan Yurek
thoughtbot, inc.
[EMAIL PROTECTED]
617 482 1300 x114


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Core" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-core?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to