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.
The parameter to append to the GET request is ?c=force
. This way, the preview is created when it does not exist.