This laravel route is returning the image sometimes and is returning an error page the other times. What could go wrong.
This route just returns the image like this:
public function image(Request $request) {
return response()->file(storage_path('app/'.$request->input('path')));
}
I'm storing images using this code:
$path = $request->p->store('public/images');
Storage::setVisibility($path, 'public');
I don't know what's going wrong. I see this log when the route is requested.
NOTICE: PHP message: [2017-09-25 18:33:25] production.ERROR: Symfony\Component\HttpFoundation\File\Exception\FileNotFoundException: The file "/app/storage/app/public/images/YxNllK0iVKAxxUSCEhFHLo5sGZiXg5NNbGDbOVSL.jpeg" does not exist in /app/vendor/symfony/http-foundation/File/File.php:37
Here's the route in it's full glory:
http://ift.tt/2wRLxuz
This is definitely not because there's no image there. I can assure you the route works some of the times.
What could have gone wrong?
I'm using Laravel 5.4 on Google App Engine.
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire