Hi All,
Please help in providing the steps to covert all unknown Mimetype documents to text/plain. I did the following steps but it is not getting updated. Please help if i am missing anything.
You cannot use a rule to set the CMIS contentStreamMimetype pseudo property. This property does not actually exist - it has only been defined to support the CMIS interface integration. Instead of using the "Set property value" action you should use the "Change/Set mimetype" action instead.
Also note that for *.msg files the mimetype text/plain is certainly not the correct mimetype, and Alfresco will not be able to properly display such emails nor index them correctly.
Hi Axel,
Thanks for your reply, but unable to find such a option "Change/Set Mimetype" action. I am able to see only the below options. Please suggest if we need to activate anything to get this option.
Continued
Hmm... Maybe my memory was incorrect and such an action does not exist out-of-the-box. In that case you would have to create a small JavaScript file in Data Dictionary -> Scripts to set the mimetype which you can then use via the "Execute script" action.
Sure will try that, I have not created any script till now.
Can you please guide me with the exact parameter which is related to Mimetype, will try updating it. Thanks in advance.
Check ScriptNode API for details. The simplest possible script would just be a single line:
document.properties.content.mimetype = 'text/plain';
There is a java code alternative for this ?
I have tried this:
FormData data = new FormData();
data.addFieldData("prop_mimetype", mimetype, true); Item itemMimetype = new Item("node", nodeRef.toString()); NodeRef nodeRefFoundedUpdated = (NodeRef)formService.saveForm(itemMimetype, data);
and this:
ContentWriter contentWriter = contentService.getWriter(nodeRef, ContentModel.PROP_CONTENT, true);
if(contentWriter != null) {
contentWriter.setMimetype(mimetype);
}
but is not working is still a "application/octet-stream" value on alfresco share
Ask for and offer help to other Alfresco Content Services Users and members of the Alfresco team.
Related links:
By using this site, you are agreeing to allow us to collect and use cookies as outlined in Alfresco’s Cookie Statement and Terms of Use (and you have a legitimate interest in Alfresco and our products, authorizing us to contact you in such methods). If you are not ok with these terms, please do not use this website.