我想將我的影像保存在我的 Laravel 專案的存盤路徑中。我正在使用包image intervention。它作業正常并將影像保存在我的本地作業系統(Windows 10)中,但不保存在服務器作業系統(Linux)中。
Storage檔案夾權限是 755 我試過 777 但也沒有用。這是我的代碼:
$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);
uj5u.com熱心網友回復:
用這個
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
轉載請註明出處,本文鏈接:https://www.uj5u.com/qiye/351209.html
上一篇:如何為WooCommerce購物車中的不同產品添加額外費用
下一篇:問題新行不會創建和替換第一行
