1
0
mirror of https://github.com/BookStackApp/BookStack.git synced 2025-08-07 23:03:00 +03:00

ZIP Exports: Added working image handling/inclusion

This commit is contained in:
Dan Brown
2024-10-21 13:59:15 +01:00
parent 06ffd8ee72
commit 4fb4fe0931
7 changed files with 148 additions and 18 deletions

View File

@@ -133,6 +133,19 @@ class ImageService
return $disk->get($image->path);
}
/**
* Get the raw data content from an image.
*
* @throws Exception
* @returns ?resource
*/
public function getImageStream(Image $image): mixed
{
$disk = $this->storage->getDisk();
return $disk->stream($image->path);
}
/**
* Destroy an image along with its revisions, thumbnails and remaining folders.
*