【发布时间】:2017-08-27 07:01:14
【问题描述】:
这个 Meteor 服务器代码在不同的地方被调用,在我的本地开发服务器上运行的代码将一个文件保存到硬盘驱动器。
但现在它在 AWS EC2 Docker 容器上运行,我该如何将文件写入 S3 存储桶?谢谢
'saveToFile': function (fileName, text) {
if (env != 'development') return;
const playPath = '/Users/localPath/' + fileName + '.html';
fs.writeFile(playPath, text, (err) => {
if (err) throw err;
console.log(`Saved to ` + fileName);
});
}
【问题讨论】:
标签: meteor amazon-s3 amazon-ec2