1
0
mirror of https://github.com/gilbertchen/duplicacy synced 2025-12-21 10:43:26 +00:00

Merge pull request #589 from fracai/b2_download_url

support downloading from a custom URL pointed at B2
This commit is contained in:
gilbertchen
2020-03-05 22:00:53 -05:00
committed by GitHub
5 changed files with 29 additions and 7 deletions

View File

@@ -15,9 +15,9 @@ type B2Storage struct {
}
// CreateB2Storage creates a B2 storage object.
func CreateB2Storage(accountID string, applicationKey string, bucket string, storageDir string, threads int) (storage *B2Storage, err error) {
func CreateB2Storage(accountID string, applicationKey string, downloadURL string, bucket string, storageDir string, threads int) (storage *B2Storage, err error) {
client := NewB2Client(accountID, applicationKey, storageDir, threads)
client := NewB2Client(accountID, applicationKey, downloadURL, storageDir, threads)
err, _ = client.AuthorizeAccount(0)
if err != nil {