cancel
Showing results for 
Search instead for 
Did you mean: 

Restricting content mime-type for a custom model type?

moschops
Champ in-the-making
Champ in-the-making
If I define my own custom content model types can I restrict what mime-types can be used by the user when they create or upload a document for that content-type? 

Out of the box the UI always lets them create inline HTML, text or XML - what if I only want text, or only HTML etc? 

I tried a blanket restriction by putting:

   <config evaluator="string-compare" condition="Content Wizards">
      <create-mime-types>
        <mime-type name="text/html" />
      </create-mime-types>
   </config>

into my custom web-client-config-custom-xml but that just added a second HTML option to the UI dropdown instead of overriding it.  Plus I'd really like to do this on a content-type by type basis.  E.g. cm:myimage restricts to image/png mime type etc.

Is the reason this is not (apparently) easy because Alfresco goes on the principle of import any type and transform it appropriately later?
1 REPLY 1

brokenindexfing
Champ in-the-making
Champ in-the-making
Hi there, moschops,

Did you find out a way to do this? If so, I'd love to know how.

Regards,
brokenindex