[FEATURE-14408] File Upload Component Should Have A Custom onClearUploads Event

Almost everywhere I use a File Upload component, I also perform some sort of listing of the files which were uploaded (in addition to actually copying those files to the Gateway file system). This listing is usually just a quick rundown of the filenames which were uploaded, but it can also include saving those filenames to an array property for insertion into a database based on some expected future event, like a confirmation.

There doesn’t seem to be a way to tell when a user has cleared the uploads in the component. I expect that when they clear the previous uploads, they no longer want to use those files, but I have no way of hooking into their clearing of the component, and so the data I’ve stored is still in place.

The File Upload component should have a custom onClearUploads() event. This event will understandably not have all of the files uploaded as they’re processed one at a time, but just having the ability to tell when the component has been cleared would allow me to reset any data I’ve stored based off of the onFileReceived event.

@awalker, could you open a feature request for this?

Hi @Katarn,

Thanks for this! I’ve opened a ticket and linked it above.

This feature was added in the 8.0.4 nightly build that was uploaded today (8/21)

1 Like

2 posts were split to a new topic: Unable to clear uploads of file upload component