如何在已部署的 Heroku 应用程序上查看文件和文件结构 [英] How to see files and file structure on a deployed Heroku app

查看:23
本文介绍了如何在已部署的 Heroku 应用程序上查看文件和文件结构的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我部署在 Heroku 上的客户端应用程序允许用户将图像上传到 Heroku.我想测试我为删除图像所做的更改,因此我需要一种方法来查看 Heroku 上文件夹结构的状态,以确保文件系统中的图像已成功删除.

My client app that is deployed on Heroku allows the user to upload images onto Heroku. I wanted to test out a change I made to delete images, so I need a way to see the state of the folder structure on Heroku to ensure the images are being deleted successfully of the file system.

我试过了 -

$ heroku run bash --app <appName>
~$ pwd
~$ cd <path to images folder>

但我在这里只能看到我随应用上传的图片,而不是通过客户端应用上传的图片.

but I only see images here that I uploaded along with the app, not what was uploaded through the client app.

我做错了什么?

推荐答案

我可以用这个命令

heroku login
heroku run bash -a APPNAME
$ cd app

APPNAME 是您的 Heroku 应用程序的名称,app 文件夹中是您的文件.

APPNAME is the name of your Heroku application And in the folder app are your files.

当你完成你的命令并想回到你的终端时,你可以写

When you finish your commands and want to return to your terminal you can write

$ exit

这篇关于如何在已部署的 Heroku 应用程序上查看文件和文件结构的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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