remember uploaded files on multi-page form

1 Answer 66 Views
Upload
zach
Top achievements
Rank 1
zach asked on 16 Dec 2021, 08:18 PM

I have a multi-page form that with upload fields that may need to be revisited to upload or change previously uploaded files. Form inputs maintain their state, but upload is blank when I return to the page after uploading a file. How would I keep the information on the list when I return to the page similar to inputs?

here is what I would like to keep upon returning to the page:

1 Answer, 1 is accepted

Sort by
0
Filip
Telerik team
answered on 17 Dec 2021, 02:43 PM

Hi, Zach,

In order to maintain the state of the uploaded files in the component, it is necessary to save the value of the upload in the application state, as shown in this example:

https://stackblitz.com/edit/react-kxhhq8-rntvkc?file=app/account-details.jsx

The main idea here is that we pass a handler function to the onAdd event that updates and saves the value. In case this example is not enough to transfer the logic to your code, please provide a working example so that we can help further.

I hope this helps.

Regards, FilipProgress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

Tags
Upload
Asked by
zach
Top achievements
Rank 1
Answers by
Filip
Telerik team
Share this question
or