Retrieve the backupPath from the storage provider itself

This commit is contained in:
Johannes Zellner
2020-06-05 13:27:18 +02:00
parent 7ba3412aae
commit 330b4a613c
7 changed files with 53 additions and 2 deletions

View File

@@ -11,6 +11,8 @@
// for the other API calls we leave it to the backend to retry. this allows
// them to tune the concurrency based on failures/rate limits accordingly
exports = module.exports = {
getBackupPath: getBackupPath,
upload: upload,
download: download,
@@ -41,6 +43,13 @@ function injectPrivateFields(newConfig, currentConfig) {
// in-place injection of tokens and api keys which came in with constants.SECRET_PLACEHOLDER
}
function getBackupPath(apiConfig) {
assert.strictEqual(typeof apiConfig, 'object');
// Result: path at the backup storage
return '/';
}
function upload(apiConfig, backupFilePath, sourceStream, callback) {
assert.strictEqual(typeof apiConfig, 'object');
assert.strictEqual(typeof backupFilePath, 'string');