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

**URL:** <https://forum.inductiveautomation.com/t/feature-14408-file-upload-component-should-have-a-custom-onclearuploads-event/26300>\
**Category:** Ignition\
**Created:** [July 4, 2019, 4:33pm UTC](https://forum.inductiveautomation.com/t/feature-14408-file-upload-component-should-have-a-custom-onclearuploads-event/26300 "2019-07-04T16:33:14Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Katarn](https://avatars.discourse-cdn.com/v4/letter/k/ed655f/32.png) [@Katarn](https://forum.inductiveautomation.com/u/Katarn)\
**Post date:** [July 4, 2019, 4:33pm UTC](https://forum.inductiveautomation.com/t/feature-14408-file-upload-component-should-have-a-custom-onclearuploads-event/26300/1 "2019-07-04T16:33:14Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![awalker](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/awalker/32/6874_2.png) [@awalker](https://forum.inductiveautomation.com/u/awalker)\
**Post date:** [July 9, 2019, 6:52pm UTC](https://forum.inductiveautomation.com/t/feature-14408-file-upload-component-should-have-a-custom-onclearuploads-event/26300/2 "2019-07-09T18:52:51Z")

</div>

Hi @Katarn,

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

---

<div class="post-metadata">

**Author:** ![awalker](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/awalker/32/6874_2.png) [@awalker](https://forum.inductiveautomation.com/u/awalker)\
**Post date:** [August 21, 2019, 3:31pm UTC](https://forum.inductiveautomation.com/t/feature-14408-file-upload-component-should-have-a-custom-onclearuploads-event/26300/3 "2019-08-21T15:31:17Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![cmallonee](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/cmallonee/32/6416_2.png) [@cmallonee](https://forum.inductiveautomation.com/u/cmallonee)\
**Post date:** [September 16, 2022, 3:11pm UTC](https://forum.inductiveautomation.com/t/feature-14408-file-upload-component-should-have-a-custom-onclearuploads-event/26300/4 "2022-09-16T15:11:54Z")

</div>

Split this topic on September 16, 2022, 3:11pm UTC

2 posts were split to a new topic: [Unable to clear uploads of file upload component](https://forum.inductiveautomation.com/t/unable-to-clear-uploads-of-file-upload-component/64178)
