10-21-2021 11:00 AM
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.
10-21-2021 11:53 AM
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...
10-22-2021 04:38 AM
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
10-22-2021 04:43 AM
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.
10-22-2021 05:13 AM
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?
10-22-2021 06:19 AM
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.
11-02-2021 07:04 AM
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.
11-02-2021 10:59 AM
This should be working:
cmis.create.doc.request.renditions.set=doclib,pdf
What Alfresco version are you using?
11-04-2021 10:41 AM
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?
11-04-2021 10:51 AM
That feature is only available from Alfresco 7, so no option to use that in Alfresco 6.
Explore our Alfresco products with the links below. Use labels to filter content by product module.