Unable to clear uploads of file upload component


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

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?

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.

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”.