I want to save my images in Storage path in my Laravel project.
I'm using package image intervention
.
It works fine and saves image in my local OS (windows 10) but not saving in server OS(Linux).
Storage
folder permissions is 755 i've tried 777 but not worked too.
Here is my code:
$filename = basename($request->tutorialImage);
$image = Image::make($request->tutorialImage)->resize(300, 400);
$image->stream();
Storage::disk('local')->put('files/shares/resizedImages/' . $filename . '-' . 300 . '-' . 400. '.jpg', $image);
CodePudding user response:
use this
chown -R $USER:www-data bootstrap/cache
chown -R $USER:www-data storage
chown -R $USER:www-data resources/views
chown -R $USER:www-data public/files
chmod -R 775 storage
chmod -R 775 bootstrap/cache
chmod -R 775 resources/views
chmod -R 775 public/files