How to persist file upload fields after a validation error.

Hi all,

Is there an easy way to not lose the file field input from the user
after a validation error? It pisses people off to have to choose
their files again just because some other field didn't pass a
validation. I've googled this and just haven't come up with much of


I'm pretty sure you can't do that for security reasons. Nothing to do
with rails of course it's just a browser thing.

Just imagine if you could pre-fill file upload fields!

Good luck!

I save the file and store it's location in a session variable, then
you can get to the file again on resubmission.
You will need a strategy to clean up orphaned files where the user has
not re-submitted the form

Andrew Timberlake - The SIMPLE way to manage your savings