Dropbox /预览不工作 [英] Dropbox /previews not working
本文介绍了Dropbox /预览不工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我尝试使用以下方式获取预览文件:
curlhttps://api-content.dropbox.com/1/previews/auto/开始使用Dropbox.pdf-H 授权:承载< ACCESS-TOKEN>
但它总是返回:
{error:no_preview.file_content。}
更新
$ b
尝试使用 / files(GET):
curlhttps://api-content.dropbox.com/1/files/auto/开始使用Dropbox .pdf-H授权:承载< ACCESS-TOKEN
解决方案
从 https://www.dropbox.com/developers/core/docs#previews :
预览仅针对具有以下
扩展名的文件生成:.doc,.docx,.docm,.ppt,.pps,.ppsx,.ppsm,.pptx,
.pptm ,.xls,.xlsx,.xlsm,.rtf
PDF不在列表中。
I'm trying to get the file preview using:
curl "https://api-content.dropbox.com/1/previews/auto/Get Started with Dropbox.pdf" -H "Authorization: Bearer <ACCESS-TOKEN>"
But it always return:
{"error": "no_preview.file_content."}
Please advise if there is anything wrong with my approach.
Update
Trying with /files (GET):
curl "https://api-content.dropbox.com/1/files/auto/Get Started with Dropbox.pdf" -H "Authorization: Bearer <ACCESS-TOKEN"
And it return the content (download the file).
解决方案
From https://www.dropbox.com/developers/core/docs#previews:
Previews are only generated for the files with the following extensions: .doc, .docx, .docm, .ppt, .pps, .ppsx, .ppsm, .pptx, .pptm, .xls, .xlsx, .xlsm, .rtf
PDF isn't on the list.
这篇关于Dropbox /预览不工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文