此Meteor服务器代码在各个地方被调用,在我的本地开发服务器上运行的代码将文件保存到硬盘驱动器。
但现在它在AWS EC2 Docker容器上运行,我该如何将文件写入S3存储桶? THX
'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);
});
}