I have an STL previewer which can preview the file with mime type "application/sla" in alfresco. So I want to render the file with the mime type "application/ply" as "application/sla". For this, I have created a rule on a folder with the following script
var renderingEngineName ='reformat'; var renditionDefinitionName ='cm:stl'; var renditionDef = renditionService.createRenditionDefinition(renditionDefinitionName, renderingEngineName); renditionDef.parameters['mime-type']='application/sla'; renditionService.render(document, renditionDef);
And I am also able to see rendition child in node browser as given in a below image
But still, I am not able to get a preview of the files with mime type "application/pla".
<beanid="thumbnailDefinitionSTLpreview"class="org.alfresco.repo.thumbnail.ThumbnailDefinition"> <propertyname="name"value="stl"/> <propertyname="mimetype"value="application/sla"/> <propertyname="transformationOptions"> <!-- The thumbnail definition have transformationOptions mandatory --> <!-- But there are none for pdf, so use SWFTransformationsOptions as a dummy --> <beanclass="org.alfresco.repo.content.transform.swf.SWFTransformationOptions"> <propertyname="flashVersion"value="9"/> </bean> </property> </bean>