Browse Source

only write to backups bucket in self host

gh-pages
Martin McKeaveney 5 years ago
parent
commit
3a50b74db8
  1. 12
      packages/server/src/utilities/fileSystem/index.js

12
packages/server/src/utilities/fileSystem/index.js

@ -130,11 +130,13 @@ exports.performBackup = async (appId, backupName) => {
),
})
// write the file to the object store
await streamUpload(
ObjectStoreBuckets.BACKUPS,
join(appId, backupName),
fs.createReadStream(path)
)
if (env.SELF_HOSTED) {
await streamUpload(
ObjectStoreBuckets.BACKUPS,
join(appId, backupName),
fs.createReadStream(path)
)
}
return fs.createReadStream(path)
}

Loading…
Cancel
Save