1

I am trying to force the creation of a custom Alfresco content, which contains a image/jpeg. I create the content with a custom WebScript. However, when I try to retrieve the preview, I get an error, as the Thumbnail was not found.

The url I use to retrieve the preview is:

/alfresco/s/api/node/workspace/SpacesStore/<UUID>/content/thumbnails/medium

I also append the following parameters:

?qc=queue&fc=force

to force preview creation on request. Conversely, when I go to Share, the preview is created in fact the previous url, without the parameters, shows the preview after visiting the content page in Share. Also, if I use the explicit preview creation service, it works, i.e.: send a POST request to /alfresco/s/api/node/workspace/SpacesStore/<UUID>/content/thumbnails with body {"thumbnailName":"medium"}.

How can I force the creation of the preview and obtain it with a single service invocation?

Thanks.

Manu
  • 4,019
  • 8
  • 50
  • 94

2 Answers2

0

The parameter to append to the GET request is ?c=force. This way, the preview is created when it does not exist.

Manu
  • 4,019
  • 8
  • 50
  • 94
0

Below webscript can be used to create thumbnails, if you need a cm:pdf you can replace doclib to pdf. This can trigger the renditions

/share/proxy/alfresco/api/node/workspace/SpacesStore/{$nodeid}/content/thumbnails/doclib?c=force

Srikanth Josyula
  • 790
  • 7
  • 15