File type input field found empty when come back to the previous step in formik wizard

281 Views Asked by At

I have created multi-step form using formik-wizard, I added file type input field in first step but if I go to 2nd step and come back to 1st step then file input field found empty. How can I solve this issue ?

Here is my code example on codesandbox.

1

There are 1 best solutions below

0
Saqib Ali On

Formik doesn't support file upload by default, but you can try the solution by following the link:

ReactJS: How to handle Image / File upload with Formik?

You can store the file value in a state variable and use it during form submission.