【发布时间】:2016-03-31 19:33:34
【问题描述】:
{ “只读”:假, “修订”:163, “字节”:50459, “thumb_exists”:是的, “rev”:“a341d3afbb”, "已修改": "2016 年 2 月 28 日星期日 15:08:41 +0000", “mime_type”:“图像/jpeg”, “大小”:“49.3 KB”, "路径": "/undefined/girl.jpg", “is_dir”:假, “修饰符”:空, “根”:“保管箱”, "client_mtime": "2016 年 2 月 28 日星期日 15:08:41 +0000", "icon": "page_white_picture",
"type": "图片/jpeg", “名称”:“女孩.jpg”, "downloadLink": "http://localhost:5500/proxy?path=https%3A%2F%2Fapi-content.dropbox.com%2F1%2Ffiles%2Fauto%2Fdropbox%2Fundefined%2Fgirl.jpg&access_token=ccpsw20fvhoac9g2:cibllca6q9vr2m5@27hvto4ucs4y8mw", “id”:“未定义/girl.jpg” }
这是我使用 hello.js 的 api() 函数时得到的 json 响应 这是我在 onclick 事件上调用的函数 函数获取名称(网络){
hello("dropbox").api('me/files', 'get',{
path: "/undefined/girl.jpg",
}).then(function(json){
log(json);
}, function(e){
alert('errrr ! '+ e.error.message);
});
return false;
}
但是当我从 json 响应中复制 downloadLink 并通过邮递员运行它时,我得到 {"error": "File not found"}
实际的问题是,我可以通过 hello.js 从 Dropbox 下载资源吗? 如果我可以,那怎么办?? 注意:在 localhost 上运行 oauth-shim
【问题讨论】:
标签: javascript hello.js