Use long-lived refresh token for the Dropbox backend

The refresh token can be downloaded from https://duplicacy.com/dropbox_start
This commit is contained in:
Gilbert Chen
2022-08-12 22:17:06 -04:00
parent 54952cef26
commit cde660ee9f
2 changed files with 3 additions and 3 deletions

View File

@@ -21,11 +21,11 @@ type DropboxStorage struct {
}
// CreateDropboxStorage creates a dropbox storage object.
func CreateDropboxStorage(accessToken string, storageDir string, minimumNesting int, threads int) (storage *DropboxStorage, err error) {
func CreateDropboxStorage(refreshToken string, storageDir string, minimumNesting int, threads int) (storage *DropboxStorage, err error) {
var clients []*dropbox.Files
for i := 0; i < threads; i++ {
client := dropbox.NewFiles(dropbox.NewConfig(accessToken))
client := dropbox.NewFiles(dropbox.NewConfig("", refreshToken, "https://duplicacy.com/dropbox_refresh"))
clients = append(clients, client)
}