AnsweredAssumed Answered

Add new mimetype via AMP

Question asked by abruzzi on Aug 4, 2014
Latest reply on Aug 6, 2014 by kaynezhang
I'm working on a amp to do some content transformations using an external server, and I need to define a new mimetype.  According to this page:

https://wiki.alfresco.com/wiki/Adding_a_Mime_Type

The content needs to go into this file:

/META-INF/mimetype/mimetype-map-custom.xml

So I created a maven project with a custom file-mapping.properties (since META-INF doesn't seem to be part of the standard amp file mapping)  And I created a file in the above location with the following content:



<alfresco-config area="mimetype-map">
    <config evaluator="string-compare" condition="Mimetype Map">
        <mimetypes>
            <mimetype mimetype="application/vnd.dac-ocr-pdf" display="MIMEtype for OCR'ed PDF for use in OCR-in-place">
                <extension>dacocr</extension>
            </mimetype>
        </mimetypes>
    </config>
</alfresco-config>


(this is a fake mimetype I'm using to do pdf to pdf conversion using an OCR server)

After running the build and test, I go to:

http://localhost:8080/alfresco/service/mimetypes

to see if the new mimetype is registered, and I see nothing.  I have double checked the war file in the maven target directory and it seems to be putting the file in the right spot.  I see no errors in the logs.  Am I missing something?

Also, is it possible to rename the file?  If the name has to be mimetype-map-custom.xml, there are potential conflicts if another amp want to add a mimetype as well.

I'm currently building against 4.2.1 enterprise.

thanks,

Geof

Outcomes