No thumbnail representation available
Hello all, I posted same question here yesterday but later realized the title was wrong, pasted incorrectly,, so this is kind of third go to get some solution to this..
Hope someone has some clue about issue that has been troubling me..
For some documents I get thumbnail representation via API with no problems, pdf files included.
But, as well, for a lot of them, I just can't get thumbnail representations of regular pdf documents we upload. Representations.entry object is empty completely, even though document is available for preview and download.
This is very troubling as we can rely on API to provide all necessary info that documentation states it does.
What can be the issue with this?
Thanks in advance.
Luka
-
We don't generate PDF representations for files that are originally PDFs. See this answer: https://community.box.com/t5/Box-Developer-Forum/PDF-representations-after-pdf-upload/m-p/45472#M3306
-
Whoops 🙂
What is the request you're making? I tested both a DOCX and a PDF file and was able to get thumbnail representations for both:
https://api.box.com/2.0/files/PDF_FILE_ID?fields=representations
Headers:
Authorization: Bearer ACCESS_TOKEN
X-Rep-Hints: [jpg?dimensions=320x320] (or 1024x1024 or w/e sizes defined in https://developer.box.com/reference#get-a-thumbnail-for-a-file)
This should return JSON with representations.entries.content.url_template, and you can swap out {+asset_path} with the empty string and append an access token to access that thumbnail.
-
Hi,
No worries 🙂
Yes, it happens successfully for me too, mostly. But when I try reuploading document from Box, downloading it through Box Picker and uploading it to our Box (via same API that is working for the rest of the files). I can't get any thumbnail representation. File is there, uploaded properly, and previewable but no thumbnail
-
Please share some more details:
- Pick a file for which you're seeing this issue - what's the file extension?
- What's the exact API call you're making including headers (redact the access token please)?
- I don't quite follow the steps you're describing. Are you re-uploading a file you've downloaded from the Box WebApp? What is the Box Picker you're referring to? When you say 'our Box' is that your Box account or your platform application built using Box?
Thanks!
Please sign in to leave a comment.
Comments
5 comments