WorkflowFileUpload object- press "Delete" from code behind?

We’re showing/hiding a form section based on a radio button. If the user fills the section, then unchecks the button, we clear all TextBox fields from code behind, so the data isn’t submitted with the form. But the WorkflowFileUpload that’s in the section, if the user uploaded a file before hiding the section, will still upload the file into process data. I want to effectively click the Delete button for the WorkflowFileUpload control from code behind. It looks like there’s some jQuery event handler that’s doing… something on that button click, but I can’t figure out what, or how to otherwise remove the uploaded file before submitting the form. Ideas?

-Eric

for file upload control in WFG, there is no visible field that you can just delete the value. To “delete” the file, there has been an old trick to clear the file by updating the associated form data value.

See article here if it can help:

Also since WFG.My 3.2.0 a new public method has been added to remove file from file upload control