How to remove all uploaded files from server side

Dear Support,

I am using clear all button to remove all attached files to the uploader. It is removing from the filelist, however my remove url is not fired and the file is not removed from server.

Let me know your va

Regards,

Gani


7 Replies 1 reply marked as answer

YS Yohapuja Selvakumaran Syncfusion Team October 19, 2022 12:22 PM UTC

Hi Gani,


We have checked your reported query. By default, the clearAll method only removes the uploaded files at DOM element. If you wish to remove uploaded files on server side, you can use remove method when button click action performed. The remove method triggered the server side remove url and you can able to remove all uploaded files in server side.


[index.js]

document.getElementById('clearbtn').onclick = () => {

  uploadObj.remove();

};


Sample: https://stackblitz.com/edit/nkeqad-vrqec3?file=index.js,index.html

API link: https://ej2.syncfusion.com/javascript/documentation/api/uploader/#remove


Regards,

Yohapuja



Marked as answer

WI will January 9, 2023 09:33 AM UTC

Go to the File Manager, Select the domain where you want to delete the files, and click Go. Navigate through your files to locate the file you want to delete. Right click the file and select Delete from the pop-up menu. Confirm the file is deleted.


Regards,

Will



GU Gunesh replied to Yohapuja Selvakumaran February 21, 2023 08:49 AM UTC

Thanks for your response.


The remove action is clearing the files. After remove action, the file uploader is not working. It is not selecting the new file.

you can test the same in your existing sample as well.

  1. upload the file 2. Clear All 3. Select new file to upload

Could you please provide proper way to remove the uploaded files



UD UdhayaKumar Duraisamy Syncfusion Team February 22, 2023 07:40 AM UTC

Hello Gunesh,


We have validated the reported query on our end, but unfortunately, we were unable to reproduce the reported issue as per your scenario. However, we have shared a sample and video illustration for your reference.

In order to assist us in identifying the problem and provide a better solution, we kindly request that you provide additional details about the issue, as mentioned below:

  1. A simple, runnable sample that illustrates the issue you are experiencing (or modify the shared sample as per your scenario).
  2. A video illustration of the issue.
  3. Syncfusion package version details using on your end.

Please provide us with the above details so that we can investigate the issue further and provide you with a better solution.


Sample : https://stackblitz.com/edit/nkeqad-yztk3c?file=index.js,index.html


Regards,

Udhaya Kumar D


Attachment: Attachment_85b86405.zip


GU Gunesh replied to UdhayaKumar Duraisamy February 22, 2023 07:53 AM UTC

Dear  UdhayaKumar Duraisamy,

In your demo after clearing you are selecting different files. So it is working fine.


Kindly Do the below steps to reportdue the issue.

  1. select 54044.jpg file 
  2. Do clear All
  3. Browse and select same 54044 file, it is not able to upload again, However you can select different file name.

Regards,

Gunesh v



UD UdhayaKumar Duraisamy Syncfusion Team February 28, 2023 05:16 AM UTC

We have considered the reported issue “After using the remove method, unable to upload the same file again” as a bug from our end, and the fix for the issue will be included in our upcoming patch releases in mid-March 2023.


You can now track the status of the feedback through the below link,

https://www.syncfusion.com/feedback/41592


Disclaimer: “Inclusion of this solution in the weekly release may change due to other factors including but not limited to QA checks and works reprioritization.”



UD UdhayaKumar Duraisamy Syncfusion Team March 29, 2023 10:53 AM UTC

We have fixed the reported issue “After using the remove method, unable to upload the same file again” from our end in the latest 21.1.35 version. So, we suggest you upgrade to our latest version to resolve the current issue.


Release Notes: https://ej2.syncfusion.com/documentation/release-notes/21.1.35/?type=all#uploader


Loader.
Up arrow icon