Skip to content

Instantly share code, notes, and snippets.

@douglascrp
Forked from wingyplus/update_thumbnail.js
Created February 6, 2019 13:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save douglascrp/f8287f506570ef8e4a5119e386e5811d to your computer and use it in GitHub Desktop.
Save douglascrp/f8287f506570ef8e4a5119e386e5811d to your computer and use it in GitHub Desktop.
importClass(Packages.org.springframework.web.context.ContextLoader);
importClass(Packages.org.alfresco.service.cmr.repository.TransformationOptions);
var context = ContextLoader.getCurrentWebApplicationContext();
var alfThumbnailService = context.getBean("thumbnailService");
alfThumbnailService.updateThumbnail(document.getThumbnail("webpreview").nodeRef, new TransformationOptions());
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment