X-Git-Url: http://source.bookstackapp.com/bookstack/blobdiff_plain/e703009d7fa6d1f3e448c23611ac907277412c42..refs/pull/5293/head:/app/Uploads/ImageStorageDisk.php diff --git a/app/Uploads/ImageStorageDisk.php b/app/Uploads/ImageStorageDisk.php index 3a95661ca..798b72abd 100644 --- a/app/Uploads/ImageStorageDisk.php +++ b/app/Uploads/ImageStorageDisk.php @@ -50,7 +50,7 @@ class ImageStorageDisk /** * Get the file at the given path. */ - public function get(string $path): bool + public function get(string $path): ?string { return $this->filesystem->get($this->adjustPathForDisk($path)); } @@ -106,6 +106,7 @@ class ImageStorageDisk */ public function mimeType(string $path): string { + $path = $this->adjustPathForDisk($path); return $this->filesystem instanceof FilesystemAdapter ? $this->filesystem->mimeType($path) : ''; } @@ -114,7 +115,7 @@ class ImageStorageDisk */ public function response(string $path): StreamedResponse { - return $this->filesystem->response($path); + return $this->filesystem->response($this->adjustPathForDisk($path)); } /**