cancel
Showing results for 
Search instead for 
Did you mean: 

Add new mimetype to Alfresco Explorer in 4.2.c

mitpatoliya
Star Collaborator
Star Collaborator
I have followed all the steps mentioned in this link but nothing is affected.
I think it is issue with Alfresco 4.2.c version.
http://wiki.alfresco.com/wiki/Adding_a_Mime_Type

Please let me know if there are any other steps involved for adding new mimetype to Alfresco explorer so that it will automatically detect the mimetype of a file based on its extension when it gets uploaded.
7 REPLIES 7

rjohnson
Star Contributor
Star Contributor
Not to helpful that wiki article.

You need to add a file in alfresco/extension/mimetype with a name in the format ????-????-map.xml The question marks can be anything to give it a meaningful name that you understand.

The contents of my file are


<alfresco-config area="mimetype-map">
   <config evaluator="string-compare" condition="Mimetype Map">
      <mimetypes>
         <mimetype mimetype="application/formonly" display="Metadata only - no content">
            <extension>mdo</extension>
         </mimetype>
      </mimetypes>
   </config>
</alfresco-config>


I delivered it in a jar, so in the project the file path is /config/alfresco/extension/mimetype/mdo-profile-map.xml

Copy the jar to shared/lib, restart and your mimetype should be available.

At least I don't recall having to edit anything else and there are no other relevant files in the project.

Hi Bob,

I have tried this approach but it is not working.
I have directly edited  mimetypes-extension-map.xml which resides under alfresco/shared/extension/mimetypes folder.
but its not working Smiley Sad

rjohnson
Star Contributor
Star Contributor
I have re-read your original post and noticed that you are talking of Alfresco Explorer. I use Share hence why my solution works for me but does not work for you I suspect.

Regrettably I can't really help you with Explorer as I never use it. My best offer (assuming your on Linux) would be to do something like go to {alf-root}/tomcat/webapps/alfresco/WEB-INF and then


find . -exec grep "application/msword" '{}' \; -print


and look for XML files that are thrown up and see which ones might have an influence.

Not the best of help, but on this one all I have to offer.

mitpatoliya
Star Collaborator
Star Collaborator
Bob,
But even in the Share I am not able to see the added mimetype. I don't know why it is not reflected.
I have even tried editing original mimetype-map.xml but still it is not piking up my mimetype.
It seems like something is missing in the documentation.I am having hard time figuring out the cause.

rjohnson
Star Contributor
Star Contributor
Mits, this is very peculiar.

Anyhow I had a 4.2c machine that did not have my JAR for adding a mimetype on it. So, I created a cut down version of my full JAR with only the mimetype extension document in it.

Then, before I uploaded the JAR I created a text document in Guest Home, and then went to Edit Properties, popped up the mimetype list and there was no trace of my new mimetype.

I then uploaded my JAR to shared/lib and restarted alfresco.

I went back to Guest Home, found my document and went to Edit Properties and bingo, popped up the mimetype list and there was my new mimetype.

Attached to this are 2 files one of the mimetype list before the JAR and one of the mimetype list after the JAR. If you mail me I will email you the JAR because I cannot attach that to this post.

You should get the same effect as I did, if you don't then something is oddly wonky about your 4.2c inatllation.

sujaypillai
Confirmed Champ
Confirmed Champ

mitpatoliya
Star Collaborator
Star Collaborator
Bob Sujay,

Thanks a lot for your help.
I got it now Smiley Happy.