cancel
Showing results for 
Search instead for 
Did you mean: 

CMIS Upload - MIME type

roodie
Champ in-the-making
Champ in-the-making
Hello,

I am using the python CMIS lib to access an Alfresco repository (latest community version) from python, and I have a problem. If I update the content stream of an existing document (using setContentStream) via cmislib, Alfresco does not recognize the mime type of the document properly, even if it is sent with the paramter contentType="application/octet-stream".

In the tests I user a simple RTF document. If I upload it using Share, it's content type will be 'Rich Text' on the properties page. But if I use cmislib to upload the exact same file, the content type will be  "Binary File (Octet Stream)", and from that moment it will not be indexed.

Any ideas? 
1 REPLY 1

jpotts
World-Class Innovator
World-Class Innovator
Can you please share the code? The setContentStream method definitely passes the mimetype along. It should use whatever you pass in contentType. If you do not pass contentType it will attempt to guess it, but it isn't very good at that, so it is better to pass it explicitly.

Jeff