01-03-2019 03:39 AM
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.
01-03-2019 04:15 AM
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.
01-03-2019 04:24 AM
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
01-03-2019 04:30 AM
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.
01-03-2019 05:35 AM
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.
01-03-2019 06:32 AM
Check ScriptNode API for details. The simplest possible script would just be a single line:
document.properties.content.mimetype = 'text/plain';
06-04-2024 10:38 AM
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
Explore our Alfresco products with the links below. Use labels to filter content by product module.