Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在从缓冲区创建一个文件并将其保存到我的 heroku 虚拟机:
var wstream = fs.createWriteStream( name + '.wav'); wstream.write(buffer) wstream.end()
我需要使用它的绝对路径将该文件发送到谷歌云存储:你知道路径是什么吗?
path = '?'
Heroku 上的应用程序根目录应该是/app. 因此,如果您在 repo 的根目录中有一个名为的文件foo.txt,它将是/app/foo.txt. 您可以通过打开控制台(例如heroku run bash)并运行来确认这一点pwd。
/app
foo.txt
/app/foo.txt
heroku run bash
pwd