]> BookStack Code Mirror - bookstack/blobdiff - app/Uploads/ImageStorageDisk.php
TS: Converted dom and keyboard nav services
[bookstack] / app / Uploads / ImageStorageDisk.php
index 3a95661ca6928fb551d797367b10b8a6bf9a4e19..798b72abdbf9d9e0384b66c2508dccf89cf39530 100644 (file)
@@ -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));
     }
 
     /**