[IGN-3351]Reset FileUpload component from script

Is there a way to invoke the “clear uploads” button on the File Upload perspective component via scripting?

I’m working on a form and the user uploads a file, but after they click the submit button, I want the uploads to clear automatically.

Not currently, but I’ve attached you to the existing ticket for this feature, which will help raise its priority.

I don’t know if we can upgrade the priority of this, but my form is causing duplicate files to be sent to the database because there’s not a way (that I know of) to clear the uploads from a script.

When the user taps the “submit” button, the script send all of the form details (including any uploaded file) to the database, and when it finished the script, it runs a “clear form” script to clear the data, but I can’t clear the uploaded files, so then the next entry has the previous entry’s uploaded file.


I’d also like the ability to perform this reset programmatically. In my use case, we do some validation on an Excel document that the user uploads. If the validation fails, we show an error message, but the FileUpload component still shows that the upload was successful. This could be confusing to end users, so I’d like to reset the component’s state if the validation fails.

This will be possible in 8.1.18. Full release is expected mid June.

1 Like

Awesome. Glad to hear that. Thanks, Paul.