support downloading from a custom URL pointed at B2

This commit is contained in:
Arno Hautala
2020-02-22 22:12:36 -05:00
parent cc88abd547
commit 46ce0ba1fb
5 changed files with 11 additions and 7 deletions

View File

@@ -530,8 +530,9 @@ func CreateStorage(preference Preference, resetPassword bool, threads int) (stor
accountID := GetPassword(preference, "b2_id", "Enter Backblaze account or application id:", true, resetPassword)
applicationKey := GetPassword(preference, "b2_key", "Enter corresponding Backblaze application key:", true, resetPassword)
downloadURL := preference.Keys["b2_download_url"]
b2Storage, err := CreateB2Storage(accountID, applicationKey, bucket, storageDir, threads)
b2Storage, err := CreateB2Storage(accountID, applicationKey, downloadURL, bucket, storageDir, threads)
if err != nil {
LOG_ERROR("STORAGE_CREATE", "Failed to load the Backblaze B2 storage at %s: %v", storageURL, err)
return nil