This commit is contained in:
Kekskurse 2021-01-12 21:11:09 +01:00
parent ef54f666c8
commit 011755e6c9

View file

@ -69,21 +69,28 @@ class PublicController extends BaseController
}
//Resize
if($size == "small") {
$image = ImageResize::createFromString($file);
$image->resizeToLongSide(self::SIZE_SMALL);
Storage::disk("cache")->put($cacheName."_small", $image->getImageAsString());
return Storage::disk('cache')->response($cacheName."_small");
}
if($size == "medium") {
$image = ImageResize::createFromString($file);
$image->resizeToLongSide(self::SIZE_MEDIUM);
Storage::disk("cache")->put($cacheName."_medium", $image->getImageAsString());
return Storage::disk('cache')->response($cacheName."_medium");
}
if($size == "big") {
$image = ImageResize::createFromString($file);
$image->resizeToLongSide(self::SIZE_BIG);
Storage::disk("cache")->put($cacheName."_big", $image->getImageAsString());
return Storage::disk('cache')->response($cacheName."_big");
}
return Storage::disk('cache')->response($cacheName."_orginal");
return abort(500);
}
private function addAccessLog(int $tenant, int $gallery, int $image, string $typ, int $size) {
$access = new Access();