Laravel-Backpack / community-forum

A workspace to discuss improvement and feature ideas, before they're actually implemented.
28 stars 0 forks source link

delete files bug in AjaxUploader.php #687

Closed ivictor777 closed 1 year ago

ivictor777 commented 1 year ago

Files are not deleted after deletion when I use the dropzone field. I found a bug in the AjaxUploader.php file, the path to the file is incorrect. You need to replace Storage::disk($this->getDisk())->delete($this->getPath().$value); to Storage::disk($this->getDisk())->delete($value);

bug
pxpm commented 1 year ago

Hello @ivictor777

Please make sure you finished the deleting functionality setup described here: https://backpackforlaravel.com/docs/6.x/crud-uploaders#deleting-files-when-entry-is-deleted

Let me know if you still experiencing issues.

Cheers

ivictor777 commented 1 year ago

@pxpm, This step has been done, but it is responsible for other functionality. Here I am talking about deleting files when I edit an entry where there is a dropzone field and I delete some of the files in it. With my change everything works correctly.

pxpm commented 1 year ago

Thanks for the clarification @ivictor777 I could confirm your findings.

I've just released backpack/PRO 2.0.13 with this fix, you should be able to get it in a couple hours when our repository is synchronized.

Thanks again for the report and the time spent here 🙏

Cheers