问题
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