1
0
Fork 0
mirror of synced 2024-09-30 09:07:25 +13:00

only write to backups bucket in self host

This commit is contained in:
Martin McKeaveney 2021-09-21 14:36:30 +01:00
parent 30a70a4a03
commit 3a50b74db8

View file

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