【发布时间】:2020-09-28 14:08:18
【问题描述】:
在 laravel 中,我使用 php artisan 创建了存储,我无法在刀片上传工作正常时访问我的图像,但我什至看不到它们已损坏的文件。即使在使用http://localhost:8000/storage/ProductId-1601294060.jpg laravel 响应未找到但图像存在于文件夹中
我尝试过的步骤
<td><strong><img src="/storage/product_image/ProductId-1601296148.jpg" height="150px" width="150px"/></strong></td>
第二步
<td> <img src="{{ URL::asset('/storage/product_image/ProductId-1601296148.jpg') }}" ></a></td>
第三步
<td><img src="{{asset('/storage/product_image/ProductId-1601296148.jpg')}}" class="img-size-50 mr-3 img-circle"></td>
也在我添加的文件配置文件系统中
'default' => 'public'
谢谢
【问题讨论】:
-
你的意思是:
http://localhost:8000/storage/product_image/ProductId-1601294060.jpg? -
告诉我们你是如何上传文件的,我怀疑你是把它上传到私人磁盘上。
-
我在这里回答了同样的问题stackoverflow.com/questions/64099558/…