0
我使用laravel Filesystem存儲圖像,圖像會默認存儲內被上傳,例如:Laravel 5.3存儲無法找到上傳的文件
/家庭/用戶/項目/ mywebapp /存儲/程序/圖片/職位/ 1/e392e17926559e7cc4e7934f.png
我沒有改變config/filesystem.php
這裏是我上傳的圖像控制器的方法,
public function storeImage(Request $request) {
$image = $request->file('image')->store('images/posts/'.Auth::user()->id);
echo Storage::url($image); // <- print the url of the uploaded image
}
這將打印圖像的URL這樣,
http://localhost:8000/storage/images/posts/1/e392e17c6a8d7926559e8e7cc4e7934f.png
但是圖像文件不會從瀏覽器accessable! 我不想使用PHP動態獲取圖像,我只是想讓他們公開http訪問。如何顯示圖像?
哇!謝謝你 – rakibtg
@rakibtg你永遠是受歡迎的... –