Stuff
This commit is contained in:
parent
ef54f666c8
commit
011755e6c9
1 changed files with 19 additions and 12 deletions
|
@ -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();
|
||||
|
|
Loading…
Reference in a new issue