1
我使用node.js和保管箱包從文件夾下載文件。我能夠驗證並列出文件,但不能下載它們。我希望能夠下載沒有共享的文件。從保管箱文件夾下載文件
client.filesListFolder({ path: directory })
.then(function (response) {
response.entries.forEach(function (entry) {
if (entry[".tag"] === "file") {
client.filesDownload({ url: entry.path_display})
.then(function (data) {
// ...
})
.catch(function (err) {
throw err;
});
}
});
})
.catch(function (err) {
me.ThrowError(null, err.status, err.error);
});
它看起來就像你使用[dropbox-sdk-js](https://github.com/dropbox/dropbox-sdk-js)並且已經找到['filesDownload'](https://dropbox.github.io/ dropbox-sdk-js/Dropbox.html#filesDownload)方法。什麼是不正確的工作?你有錯誤嗎? – Greg