X-Git-Url: http://source.bookstackapp.com/bookstack/blobdiff_plain/c76b5e2ec45cb6847d8f950ae80001b263285bf6..refs/pull/4467/head:/app/Uploads/AttachmentService.php diff --git a/app/Uploads/AttachmentService.php b/app/Uploads/AttachmentService.php index 88bb41efb..ddabec09f 100644 --- a/app/Uploads/AttachmentService.php +++ b/app/Uploads/AttachmentService.php @@ -9,7 +9,7 @@ use Illuminate\Contracts\Filesystem\Filesystem as Storage; use Illuminate\Filesystem\FilesystemManager; use Illuminate\Support\Facades\Log; use Illuminate\Support\Str; -use League\Flysystem\Util; +use League\Flysystem\WhitespacePathNormalizer; use Symfony\Component\HttpFoundation\File\UploadedFile; class AttachmentService @@ -54,7 +54,7 @@ class AttachmentService */ protected function adjustPathForStorageDisk(string $path): string { - $path = Util::normalizePath(str_replace('uploads/files/', '', $path)); + $path = (new WhitespacePathNormalizer())->normalizePath(str_replace('uploads/files/', '', $path)); if ($this->getStorageDiskName() === 'local_secure_attachments') { return $path;