Hi,
I have a vue application where I want to download files in a specific folder. But when I call the method to do it I am getting the following error:
TypeError: Dropbox.Dropbox is not a constructor
I am using the latest version of the following package:
"dropbox": "^10.10.0",
Can someone help me please?
This is my code hope someone can help me Identify the mistake:
getImages() {
require("isomorphic-fetch");
const Dropbox = require("dropbox").Dropbox;
const dbx = new Dropbox.Dropbox({
accessToken: '<REDACTED>', fetch
});
dbx.filesDownload({
path: "/test"
}).then(function(response){
console.log(response)
})
}Update:
If I change the version to 4.0.30 and use new Dropbox instead of Dropbox.Dropbox I am getting the following error:
"missing_scope", required_scope: "files.content.read"} But I have given this permission in my app. If I use the Dropbox.Dropbox in this version I am still getting the is not a constructor error even though it states that it works in another post here.