lundi 2 juillet 2018

Laravel 5.6 - Permission denied when trying to retrieve image

I have a Laravel 5.6 project running on a Windows Bitnami WAMP stack. I am storing an image like this..

$imageName = myfile.jpg
$path = $request->file->storeAs('images', $imageName);

This works and the file is correctly stored, I am trying to retrieve it like this..

$source = Storage::get('images', $imageName);

But I get the error message...

file_get_contents(C:\Bitnami\wampstack-7.1.18-1\apache2\htdocs\myproject\storage\app\images): failed to open stream: Permission denied

This looks like a permissions issue, the storage\app\images folder looks like this

drwxr-xr-x 1 win_user 192142 0 Jul  2 18:15 images

Anyone any ideas where I am going wrong?



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire