1
0
mirror of https://github.com/gilbertchen/duplicacy synced 2025-12-16 08:13:20 +00:00

Implement the WebDAV backend

This commit is contained in:
Gilbert Chen
2018-04-02 20:03:50 -04:00
parent 6aedc37118
commit 0db8b9831b
3 changed files with 429 additions and 1 deletions

View File

@@ -146,6 +146,13 @@ func loadStorage(localStoragePath string, threads int) (Storage, error) {
storage, err := CreateSwiftStorage(config["storage_url"], config["key"], threads)
storage.SetDefaultNestingLevels([]int{2, 3}, 2)
return storage, err
} else if testStorageName == "pcloud" {
storage, err := CreateWebDAVStorage(config["host"], 0, config["username"], config["password"], config["storage_path"], threads)
if err != nil {
return nil, err
}
storage.SetDefaultNestingLevels([]int{2, 3}, 2)
return storage, err
} else {
return nil, fmt.Errorf("Invalid storage named: %s", testStorageName)
}