cancel
Showing results for 
Search instead for 
Did you mean: 

How to generate a thumbnail use alfresco

andywong
Champ in-the-making
Champ in-the-making
Hi
I met a problem when I use alfresco generate thumbnails. I use the php curl send the post request to the
<a>http://localhost:8080/alfresco/service/api/node/workspace/SpacesStore/66f766c0-4245-42e3-9133-06b962...</a>. And got the response with the follow message:

Array (
  [thumbnailName] => medium
 
)
Forgive me convert json data into array.
But when I visit the <a> http://localhost:8080/alfresco/se...






3 REPLIES 3

jpotts
World-Class Innovator
World-Class Innovator
The reason is that thumbnails are generated asynchronously and the thumbnail rendition must first be requested. The way to do that is to append "?c=queue" to your URL.

If you want to make sure that you always get a placeholder thumbnail back when an actual thumbnail doesn't exist, append "&ph=true" to your URL.

So the full URL in your case to (1) request a thumbnail generation and (2) get the placeholder back until the thumbnail exists would be:
http://localhost:8080/alfresco/service/api/node/workspace/SpacesStore/66f766c0-4245-42e3-9133-06b962...

Read the docs at: http://docs.alfresco.com/4.2/topic/com.alfresco.enterprise.doc/references/RESTful-ThumbnailThumbnail...

Jeff

andywong
Champ in-the-making
Champ in-the-making
Hi Jeff
   Thanks for your replay. I used the URL you provided and still got a 404 error. But I use this url <a href="http://localhost:8080/alfresco/service/api/node/workspace/SpacesStore/66f766c0-4245-42e3-9133-06b962...">http://localhost:8080/alfresco/service/api/node/workspace/SpacesStore/66f766c0-4245-42e3-9133-06b962...</a> can receive an orange picture(not true thumbnail). I need to generate a thumbnail for a picture. So which thumbnail name to be used?
Thanks again.
Andy

amineelhaddaj
Champ in-the-making
Champ in-the-making
Hi Andy !
Did you manage to display this thumbnail ?