# Unable to clear uploads of file upload component

**URL:** <https://forum.inductiveautomation.com/t/unable-to-clear-uploads-of-file-upload-component/64178>\
**Category:** Ignition\
**Tags:** scripting, perspective\
**Created:** [September 16, 2022, 7:56am UTC](https://forum.inductiveautomation.com/t/unable-to-clear-uploads-of-file-upload-component/64178 "2022-09-16T07:56:48Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![sagar.iparkar](https://avatars.discourse-cdn.com/v4/letter/s/47e85d/32.png) [@sagar.iparkar](https://forum.inductiveautomation.com/u/sagar.iparkar)\
**Post date:** [September 16, 2022, 7:56am UTC](https://forum.inductiveautomation.com/t/unable-to-clear-uploads-of-file-upload-component/64178/1 "2022-09-16T07:56:48Z")

</div>

self.getSibling(“FileUpload”).clearUploads()

showing below error :AttributeError: ‘com.inductiveautomation.perspective.gateway.script’ object has no attribute ‘clearUploads’  
Can you please share function implementation any ref code ?

---

<div class="post-metadata">

**Author:** ![lrose](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/lrose/32/62724_2.png) [@lrose](https://forum.inductiveautomation.com/u/lrose)\
**Post date:** [September 16, 2022, 1:45pm UTC](https://forum.inductiveautomation.com/t/unable-to-clear-uploads-of-file-upload-component/64178/2 "2022-09-16T13:45:35Z")

</div>

The feature in this post is in reference to an event onUploadsCleared().

The function you are asking about wasn’t added until 8.1.18.

What version of Ignition are you running, is the path `self.getSibling("FileUpload")` correct? Did you use the property selector to get the path or type it in manually?

---

<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:14pm UTC](https://forum.inductiveautomation.com/t/unable-to-clear-uploads-of-file-upload-component/64178/3 "2022-09-16T15:14:41Z")

</div>

The failure you are encountering does lead me to believe that you might not be using the minimum required version for that component function. As @lrose explained, the function was [not available until 8.1.18](https://docs.inductiveautomation.com/display/DOC81/Perspective+-+File+Upload#:~:text=object-,Component%20Functions,-.clearUploads()).

If you are indeed using 8.1.18, then the only explanation I could offer is that you have a component which is NOT a File Upload but which is actually named “FileUpload”.
