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 // 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)
} }

Loading…
Cancel
Save