We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d951c13 commit 3ec1573Copy full SHA for 3ec1573
src/Controllers/DeleteController.php
@@ -2,6 +2,7 @@
2
3
namespace UniSharp\LaravelFilemanager\Controllers;
4
5
+use Illuminate\Support\Facades\Storage;
6
use UniSharp\LaravelFilemanager\Events\ImageIsDeleting;
7
use UniSharp\LaravelFilemanager\Events\ImageWasDeleted;
8
@@ -18,6 +19,12 @@ public function getDelete()
18
19
$errors = [];
20
21
foreach ($item_names as $name_to_delete) {
22
+ $file = $this->lfm->setName($name_to_delete);
23
+
24
+ if (!Storage::disk($this->helper->config('disk'))->exists($file->path('storage'))) {
25
+ abort(404);
26
+ }
27
28
$file_to_delete = $this->lfm->pretty($name_to_delete);
29
$file_path = $file_to_delete->path();
30
0 commit comments