Sketching in Alfresco 4.0.d

I am using Java web services in Alfresco Community 4.0.d and am currently looking to add thumbnails to my site. I noticed that thumbnails are not available immediately after the publication of a new image; I was wondering if anyone could recommend a good approach to let the generation run manually?

+3
source share
1 answer

Answered your question on the forums. Using the JavaScript API, you can ask the document to generate its thumbnail, for example:

document.createThumbnail("doclib");

In this case, “doclib” is the name of the thumbnail configuration for the document library thumbnails in Share, but it can be any thumbnail description you created.

http://docs.alfresco.com/4.0/topic/com.alfresco.enterprise.doc/references/API-JS-Thumbnail-createThumbnail.html

Java org.alfresco.repo.thumbnail.CreateThumbnailActionExecuter. - . , , actionService create-thumbnail.

, , - . , , :

ActionService actionService = getServiceRegistry().getActionService();
Action mailAction = actionService.createAction(MailActionExecuter.NAME);
mailAction.setParameterValue(MailActionExecuter.PARAM_SUBJECT, ExternalReviewNotification.SUBJECT);        
mailAction.setParameterValue(MailActionExecuter.PARAM_TO, recipient);
mailAction.setParameterValue(MailActionExecuter.PARAM_FROM, ExternalReviewNotification.FROM_ADDRESS);
mailAction.setParameterValue(MailActionExecuter.PARAM_TEXT, sb.toString());

actionService.executeAction(mailAction, null);

, "create-thumbnail" ( CreateThumbnailActionExecuter.NAME). , , PARAM_CONTENT_PROPERTY, "cm: content" PARAM_THUMBNAIL_NAME, "doclib" , .

, executeAction " noderef". , node, .

+5

All Articles