I am trying to load multiple images via a Laravel endpoint. Unfortunately of what I've experienced is that Laravel will only allow one request at a time, which is not very UX friendly if you are loading multiple images and each image takes ages to load.
I already tried to Google something but I couldn't find anything on how to disable this mechanism for a single route.
web.php:
Route::get('image/{id}', 'SomeController@getImage');
SomeController::getImage:
header('Content-Type:image/png');
$image = sprintf('%s/%d.png', self::IMAGE_DIR, $id);
return readfile($image);
I want to tell Laravel "please allow as many requests as you want for this endpoint, because I don't really care since this only affects reading stuff".
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire