mardi 18 juillet 2017

can`t write in public_html/images using laravel and intervation Image

I have a problem with permissions. On my host i created a folder images on /home/public_html/images and set the full permission from cpanel 777. When i try to upload an image using dropzone it says:

production.ERROR: exception 'Intervention\Image\Exception\NotWritableException' with message 'Can't write image data to path (/home/username/app_folder/public/images/15003681530.jpg)' in /home/username/app_folder/vendor/intervention/image/src/Intervention/Image/Image.php:143

Why is trying to write in /home/username/public/images folder? The folder is not in that path, is in /home/username/public_html/images

// create a unique name for each image
$filename = time() . $i . '.' . $image->getClientOriginalExtension();
// create a location
$location = public_path('images/').$filename;
// save the image to that location
Image::make($image->getRealPath())->resize(200,200)->save($location);

I am using laravel 5.4 and Intervention Image for laravel.



from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/2uE6MTP
via IFTTT

Aucun commentaire:

Enregistrer un commentaire