We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: June 24, 2019).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Clearing the files from the uploader controller in code

Thread ID:





140224 Oct 4,2018 02:52 PM UTC Oct 5,2018 12:27 PM UTC ASP.NET Core - EJ 2 2
Tags: File Upload
Asked On October 4, 2018 02:52 PM UTC

I am using an uploader in a bootstrap modal.  During a session the user might open the modal several times.  I would like to be able to clear the files listed in the uploader after I have finished processing (I can see them in ul.e-upload-files when I snoop the html with the debugger, but I am not sure that deleting them is a good idea).  I don't see any API in the doc that might do this.  

How do I delete files from the uploader once my processing is complete.

note: I am using a single file chunked uploader.  Once the file has been uploaded, the user can submit a form to 'finalize' the creation of the upload.  After that, I hide the modal and it is ready to re-use next time.

Thanks in advance.


Replied On October 5, 2018 05:32 AM UTC

HI.  I looked in the JS2 Javascript doc and saw the clearAll() method on the uploader.  I had not realized I could find useful documentation there that was valid for aspnetcore.  This issue is solved:

                    const uploader = document.getElementById("uploadFiles").ej2_instances[0];
                    if (uploader !== null && uploader.clearAll !== null && typeof (uploader.clearAll) !== "undefined") {



Prince Oliver [Syncfusion]
Replied On October 5, 2018 12:27 PM UTC

Hi Sellinger, 

Thank you for contacting Syncfusion support. 

We are glad to know that your issue is resolved. We have documented all the available properties, methods, events. You can find them in the following links:  

Please let us know if you require any further assistance on this. 



This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile
Live Chat Icon