Applied the fix to Rails. I also submitted this patch to Rack: http://rack.lighthouseapp.com/projects/22435/tickets/
On Jan 20, 11:21 am, "Mislav Marohnić" <[email protected]> wrote: > Ticket > createdhttp://rails.lighthouseapp.com/projects/8994-ruby-on-rails/tickets/17... > I would like to ask someone to create a failing tests for this. I didn't > figure out how to simulate a browser submitting an empty form field -- I > don't even know what it sends. An empty byte stream with Content-Type: > application/octet-stream; Content-Transfer-Encoding: binary? I tried, but > ordinary String comes through instead of Tempfile. > > On Tue, Jan 20, 2009 at 16:56, Joshua Peek <[email protected]> wrote: > > > On Tue, Jan 20, 2009 at 9:48 AM, Mislav Marohnić > > <[email protected]> wrote: > > > In my workaround I detect there was no file if the `filename` property is > > > blank. Are there cases a valid file could be uploaded without an original > > > filename? Is a better check to see if the size of Tempfile is 0, also? > > > I think a filename is always provided. Could probably check > > params[:tempfile].length as you suggested too. > > > hrm, maybe this is a Rack issue too :) > > I don't think Rack's multipart parser should be creating empty tempfiles. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
