AnsweredAssumed Answered

Restricting content mime-type for a custom model type?

Question asked by moschops on Jan 31, 2009
Latest reply on Jul 22, 2010 by brokenindexfinger
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?

Outcomes