Pass fetch option to Dropbox
This commit is contained in:
parent
2f0dc625c5
commit
534e5a69d0
|
@ -31,7 +31,10 @@ function hasDropboxAccessToken() {
|
|||
}
|
||||
|
||||
function requestDropboxAccessToken() {
|
||||
const client = new Dropbox.Dropbox({clientId: DROPBOX_API_KEY});
|
||||
const client = new Dropbox.Dropbox({
|
||||
clientId: DROPBOX_API_KEY,
|
||||
fetch
|
||||
});
|
||||
const authUrl = client.getAuthenticationUrl(getRedirectUrlAuthFlow());
|
||||
return launchWebAuthFlow({url: authUrl, interactive: true})
|
||||
.then(urlReturned => {
|
||||
|
@ -57,7 +60,8 @@ $('#sync-dropbox-export').onclick = () => {
|
|||
.then(token => {
|
||||
const client = new Dropbox.Dropbox({
|
||||
clientId: DROPBOX_API_KEY,
|
||||
accessToken: token
|
||||
accessToken: token,
|
||||
fetch
|
||||
});
|
||||
return client.filesDownload({path: '/' + DROPBOX_FILE})
|
||||
.then(() => messageBox.confirm(t('overwriteFileExport')))
|
||||
|
@ -130,7 +134,8 @@ $('#sync-dropbox-import').onclick = () => {
|
|||
.then(token => {
|
||||
const client = new Dropbox.Dropbox({
|
||||
clientId: DROPBOX_API_KEY,
|
||||
accessToken: token
|
||||
accessToken: token,
|
||||
fetch
|
||||
});
|
||||
return client.filesDownload({path: '/' + DROPBOX_FILE})
|
||||
.then(response => {
|
||||
|
|
Loading…
Reference in New Issue
Block a user