From Dragonfly docs:
Retaining across form redisplays
When a model fails validation, you don't normally want to have to upload your attachment again, so you can avoid having to do this by including a hidden field in your form retained_<attribute_name>, e.g.
<% form_for @photo, :html => {:multipart => true} do |f| %>
...
<%= f.file_field :image %>
<%= f.hidden_field :retained_image %>
...
<% end %>