AnsweredAssumed Answered

Persisting a rendition via JavaScript

Question asked by ljgp on May 4, 2015

I read this blog post by Bas Peters about persisting renditions:

The aim is to have Alfresco update the rendition every time document properties are updated.

The Java call mentioned is:


My question is: how to do this from JavaScript ? My script file currently creates a pdf rendition for ms word files on upload:

renditionDef = renditionService.createRenditionDefinition('cm:pdfRendition', 'reformat');
renditionDef.parameters["mime-type"] = "application/pdf";

But the rendition does not change after updates. Trying to call


results in a typeerror: method is not defined.

Is there a way around this ? The JavaScript API is preferred because it is easier to use and easier to get through systems management (just a script and some content rules as opposed to the more heavy weight Java stuff).

Regards, Luc.