update:更新附件删除

This commit is contained in:
JaguarJack 2020-10-14 20:17:18 +08:00
parent 8991315888
commit c5aee52667

View File

@ -42,7 +42,7 @@ class Attachments extends CatchController
if ($attachment->driver == 'local') { if ($attachment->driver == 'local') {
$localPath = config('filesystem.disks.local.root') . DIRECTORY_SEPARATOR; $localPath = config('filesystem.disks.local.root') . DIRECTORY_SEPARATOR;
$path = $localPath . str_replace('\\','\/', $attachment->path); $path = $localPath . str_replace('\\','\/', $attachment->path);
if (!FileSystem::exists($path)) { if (FileSystem::exists($path)) {
Filesystem::delete($path); Filesystem::delete($path);
} }
} else { } else {