0
我尝试使用新的Drobox API读取和写入我的Dropbox上的文件,我已经创建了一个变量,可以访问我的账户,并且能够列出我的内容Dropbox,但到目前为止我还无法获得特定的文件内容。我在控制台输出中收到的是,读取和写入文件Dropbox API V2
todocl.file - 文件路径,即'Test.txt'(我试过'/Test.txt',只是给出了409错误,找不到路径。 )
和
保管箱-sdk.min.js:8未捕获的抛出:DOMException:未能读取从“的XMLHttpRequest”的“responseText的”属性:该值是仅可访问如果对象的“的responseType”是'或'文本'(是'blob')。
function readFiles() {
todocl.dbx.filesDownload({
path: '/Help.txt'
}).then(function (response) {
var text = response.fileBlob;
var reader = new FileEventListener("loadend", function() {
console.log(reader.result);
});
reader.readAsText(text);
}).catch(function (error) {
console.error(error);
});
}
Dropbox的阿比 http://dropbox.github.io/dropbox-sdk-js/Dropbox.html
任何帮助将是巨大的!
这里的基础如何存储文本内容: 'dbx.filesUpload({ \t路径:taskFile, \t内容: '文本内容', \t模式:{ \t \t” .TAG “: “覆盖” \t}, \t autorename:假 })然后(函数(数据){ \t的console.log(数据); 。 catch(function(error){}。 }); ' – marcus