FileUpload Reset

Hello Again,

I cannot figure out how to clear the file upload option on command. The problem that occurs in the project is that after the user saves their data, the file upload icon does not refresh back to the default icon we have chosen which looks like this image.

Default Icon

After uploading a file, there an "Upload Successful!" message that appears and a green checkmark.
Here is an image of what I am attempting to describe.

Clear Uploads

I would like to reset that with a line of code just like what would happen if the user clicked on that refresh circle the red arrow is pointing at. By clicking on that circle, the user would then see the following image again (the default icon).

After Clearing Upload

In other words, how can I write code that does what the refresh circle option does?

Thank you!

Documentation: Perspective - File Upload - Ignition User Manual 8.1 - Ignition Documentation

Man! I read through the documentation before posting but never considered concatenating ".clearUploads(). to the end of the of "self.getSibling("FileUpload")"

Final solution looks like self.getSibling("FileUpload").clearUploads()

I am sorry to have wasted folks' time. Maybe someone will find this post useful in the future.
Thank you for pointing me back to the documentation!!

1 Like