Created
June 9, 2020 10:49
-
-
Save tobymarsden/f5e84e545e969f929b1ed0d4218eed14 to your computer and use it in GitHub Desktop.
Dropbox integration
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const Dropbox = require('dropbox').Dropbox | |
const fetch = require('isomorphic-fetch') | |
// var filePath = ... | |
// var sourceUrl = ... | |
var api = new Dropbox({ | |
fetch, | |
accessToken: shop.get('dropbox_access_token') | |
}) | |
var res = await api.filesSaveUrl({ | |
path: filePath | |
url: sourceUrl | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment