Is it possible to preserve the uploaded file in input type="file" tag

552 Views Asked by At

I am using <input type="file" name="upload_file" > inside a form on submitting I am using a post action , where it processes all the form fields , suppose when it encounts an error and returns to the original form itself . Is it possible to preserve the selected file by the user rather than asking the user to again click browse and select the file .

1

There are 1 best solutions below

0
On

You could use client-side validations for the form fields, that way you can keep the uploaded file.