Retaining file object

Dear All,

I have a form with file upload option and others input fields. if a

user makes error in any input field is it possible to show the form
again with the error msg and input field populated with the file object
so that user can correct the mistake alone and submit the form again
without choosing the file again.