Dropbox /previews not working

南笙酒味 提交于 2020-01-06 14:48:36

问题


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).


回答1:


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.



来源:https://stackoverflow.com/questions/30777188/dropbox-previews-not-working

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!