应用/公共(laravel)中的图像未在Heroku应用中显示 [英] Images in app/public (laravel) not show in Heroku app

查看:97
本文介绍了应用/公共(laravel)中的图像未在Heroku应用中显示的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在laravel中有一个项目,其中一个部分将图像上传到服务器.使用文件存储将图像保存在/storage/app/public文件夹中. 在本地正常工作中,图像看起来不错,但是当我将项目上传到heroku时,看不到图像. 即使在heroku中,也运行命令"php artisan storage:link"

I have a project in laravel which one of the sections upload images to the server. Images are saved by using File storage and in the / storage / app / public folder. In local works correctly, the images look good, but when I upload the project to heroku, the images are not seen. Even in heroku run the command "php artisan storage: link"

为什么我看不到图像?我不想为此使用AWS S3. 我想念什么?

Why can not I see the images? I would not want to use AWS S3 for this. What could I miss?

谢谢..

推荐答案

Heroku没有文件存储.因此,如果要在服务器上使用它,则需要找出另一种存储文件的方式.

Heroku doesn't have file storage. So if you're going to use it for your servers you need to figure out another way to store files.

这篇关于应用/公共(laravel)中的图像未在Heroku应用中显示的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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