This project is archived and is in readonly mode.

#1945 ✓resolved
Chris Barnes

Multipart form with empty file_field submits nil

Reported by Chris Barnes | February 11th, 2009 @ 07:54 PM

I noticed that posting a multipart form with a blank file_field submits a nil in edge rails. Is this the intended behavior? In rails 2.2 it submitted an empty string.

I'm using the paperclip plugin which ignores the empty string but deletes attachments that are set to nil. With this new behavior, paperclip deletes every attachment on update. If this is the intended behavior for rails 2.3 then I'll submit a ticket on the paperclip project about modifying the plugin to handle nil values a different way.

My rails SHA-1 is 1a2a71333f197e98d1cd7fe380d613cbada4446b

Comments and changes to this ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

<h2 style="font-size: 14px">Tickets have moved to Github</h2>

The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>

Attachments

Referenced by

Pages