I am developing CMIS based application code to get thumbnails from the Alfresco repository. But thumbnails are not available immediately after insertion. How can I set CMIS when creating a file, pls? Can I set up on Map<String, Object>, ContentStream, or another way to start doclib creation?
I want to do something similar to JavaScript.
document.createThumbnail("scImageThumbnail", true);
Or is it just about setting the Alfresco?
Thanks.
The action to create a rendition (the thumbnail) can't be fired from CMIS API (afaik). So you need to wait for Alfresco to create that and once this happens, you can get the rendition by using Rendition API.
Sample code for this operation is available in @jpotts reply to this question: https://stackoverflow.com/questions/38655368/how-to-get-rendition-copy-of-word-document-from-alfresc...
I use this GET request for thumbnail, works if doc lib is created. But doc lib is only generated if I open the Alfresco UI with this file.
Is it possible to append the OperationContext to the GET request parameter ?c=force via CMIS?
In ALF7 I have these parameters in alfresco-global. properties:
transform.service.enabled=true local.transform.service.enabled=true messaging.subsystem.autoStart=true alfresco.restApi.basicAuthScheme=true
Is there anything else to add?
Is there a lazy evaluation of thumbnails in alfresco? If so, how do I turn it off? I need to ensure that ALF creates a thumbnail immediately after inserting the file via CMIS.
Thanks
In order to create a new rendition (after the inserting the file using CMIS) you need to use the Alfresco REST API:
https://api-explorer.alfresco.com/api-explorer/#/renditions/createRendition
There is no option available from CMIS Client.
In ALF6, thumbnails were generated from documents(pdf, txt, pptx, csv, etc) immediately after insertion. Only thumbnails from images were not generated automatically. What's the rendition in ALF6 and ALF7 different?
Not sure if that is the root cause, but Transformers changed from ACS 6.2:
On the other hand, I've found this property:
You'll find additional details in:
https://github.com/Alfresco/alfresco-community-repo/commit/3ad33034f122af679e9ad065b59d6906939cc58e
Note that this is also an asynchronous operation.
Thank you for the advice, REST generating thumbnail is functioning perfectly. Could you also give me advice on how to set up CMIS, please?
cmis.create.doc.request.renditions.set=
I have already tried to set up doclib, thumbnail, scImageThumbnail yet it has not to trigger the correct transformation.
In the case of CMIS is error thumbnail="true" against REST transformation. If the transformation is started using CMIS, then doclib is not created. It is created only after the REST call.
This should be working:
cmis.create.doc.request.renditions.set=doclib,pdf
What Alfresco version are you using?
In ALF7 with embedded ImageMagick works perfectly.
But I need it to work for ALF6.
In ALF6 works only documents. It does not create a thumbnail from the images.
In ALF6 I have this configuration.
img.root=/usr/lib64/ImageMagick-7.0.7
img.coders=/usr/lib64/ImageMagick-7.0.7/modules-Q16HDRI/coders
img.config=/usr/lib64/ImageMagick-7.0.7/config-Q16HDRI
img.exe=/usr/bin/convert
alfresco.restApi.basicAuthScheme=true
messaging.subsystem.autoStart=false
Do I need to add anything else for ALF6, pls?
That feature is only available from Alfresco 7, so no option to use that in Alfresco 6.
Ask for and offer help to other Alfresco Content Services Users and members of the Alfresco team.
Related links:
By using this site, you are agreeing to allow us to collect and use cookies as outlined in Alfresco’s Cookie Statement and Terms of Use (and you have a legitimate interest in Alfresco and our products, authorizing us to contact you in such methods). If you are not ok with these terms, please do not use this website.