X-Git-Url: http://source.bookstackapp.com/bookstack/blobdiff_plain/d1f28ed245ae674a610ea6d5094ab3ea5d30b0cc..refs/pull/5349/head:/app/Uploads/ImageStorageDisk.php diff --git a/app/Uploads/ImageStorageDisk.php b/app/Uploads/ImageStorageDisk.php index 798b72abd..8df702e0d 100644 --- a/app/Uploads/ImageStorageDisk.php +++ b/app/Uploads/ImageStorageDisk.php @@ -55,6 +55,15 @@ class ImageStorageDisk return $this->filesystem->get($this->adjustPathForDisk($path)); } + /** + * Get a stream to the file at the given path. + * @returns ?resource + */ + public function stream(string $path): mixed + { + return $this->filesystem->readStream($this->adjustPathForDisk($path)); + } + /** * Save the given image data at the given path. Can choose to set * the image as public which will update its visibility after saving.