This commit is contained in:
Kekskurse 2021-01-17 03:13:19 +01:00
parent e94b51d714
commit a25a9ec0db
2 changed files with 2 additions and 3 deletions

View file

@ -47,7 +47,7 @@ class PublicController extends BaseController
if(!array_key_exists($sizeName, $this->size)) { if(!array_key_exists($sizeName, $this->size)) {
abort(400, "Size not exists"); abort(400, "Size not exists");
} }
$size = $this->size[$sizeName]; $size = (int)$this->size[$sizeName];
$image = Image::query()->where("id", "=", $image_id)->firstOrFail(); $image = Image::query()->where("id", "=", $image_id)->firstOrFail();
$gallery = Gallery::query()->where("url", "=", $gallery_url)->firstOrFail(); $gallery = Gallery::query()->where("url", "=", $gallery_url)->firstOrFail();
@ -70,7 +70,6 @@ class PublicController extends BaseController
//Return from s3, takes a loooong time //Return from s3, takes a loooong time
var_dump((integer)$image->id);exit();
$resizeJob = new ResizeImage((integer)$image->id, $size); $resizeJob = new ResizeImage((integer)$image->id, $size);
ResizeImage::dispatchSync($resizeJob); ResizeImage::dispatchSync($resizeJob);

View file

@ -29,7 +29,7 @@ class ResizeImage implements ShouldQueue
* *
* @return void * @return void
*/ */
public function __construct(int $image_id, int $size) public function __construct($image_id, $size)
{ {
$this->image_id = $image_id; $this->image_id = $image_id;
$this->size = $size; $this->size = $size;