Laravel Spark不显示存储在/storage/app/public/profiles/目录中的图像 [英] Laravel Spark is not displaying images that are stored in the /storage/app/public/profiles/ directory

查看:190
本文介绍了Laravel Spark不显示存储在/storage/app/public/profiles/目录中的图像的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

上载图像的默认设置为/storage/app/public/profiles/,但未找到前端生成的/storage/profiles/图像的URL.

The default for uploaded images appears to be /storage/app/public/profiles/, but the frontend generated URL of /storage/profiles/image isn't being found.

我试图找到该目录的任何类型的路由,但未能做到这一点.任何帮助将不胜感激.

I tried to find any sort of routing for that directory and haven't been able to do so. Any help would be appreciated.

推荐答案

您必须链接到存储目录.从文档:

You must link to the storage directory. From the documentation:

一旦安装了Spark,您应该将public/storage目录链接到您的storage/app/public目录.否则,存储在本地磁盘上的用户个人资料照片将不可用

Once Spark is installed, you should link the public/storage directory to your storage/app/public directory. Otherwise, user profile photos stored on the local disk will not be available

以及相关代码:

ln -s /path/to/storage/app/public /path/to/public/storage

这篇关于Laravel Spark不显示存储在/storage/app/public/profiles/目录中的图像的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆