[Feature-16560] External Clean or Reset of uploaded files on component File Upload - Perspective

Hello,
I need help please, to clean the files of my File Upload component through an external button in the view and not from the internal refresh button that the component has.

If you can help me how to do it please

Cheers
Carolina

1 Like

Just some clarification:
Are you just attempting to reset the appearance of the component so that it looks like it did before you uploaded the files, or are you trying to do something with the files themselves after they’ve been uploaded?

It is a form filling for list of records that includes the possibility of attaching files, in case the user decides to cancel the entire action for the entire form, through a cancel button I need to clean the form fields and if the user attached any file with the File Upload component. I need to clean or empty the files that the user may have attached so that when he wants to perform the action again he will not find the File Upload with attached files.

Okay. As of right now the only way to change the displayed state of the File Upload component is to manually click the reset/refresh icon or reload the page. I’ve opened a feature ticket to provide a component method which would allow for resetting the displayed state on the front-end. This should allow for resetting the component to its unused state. It will most likely be some time before this feature is implemented.

1 Like

Bump :wink:

Running into the same situation here where I have a data entry form that includes a file upload. When the user clicks a ‘clear’ button, I would like to be able to reset the file upload component to its original state. Any progress on this feature?

It’s been in limbo for a long while now, but was just pinged yesterday for re-review so that it could receive a priority. So… it’s in progress, but I would not expect it anytime soon.

@cmallonee I would also like to check on this feature. We have a clear way to flush out the variables where file uploads are stored, but we need a programmatic way to push this button:

In our case when the user presses submit, we want to clear the whole screen. We are able to wipe out the actual data, but the screen still shows as if something is still attached.

Thanks,

Nicl

2 Likes

On the file upload component, use the method clearUploads(). This refreshes the component with the cloud icon.