cancel
Showing results for 
Search instead for 
Did you mean: 

CMIS upload leaving Mimetype as 'unknown'

bdaniel
Champ in-the-making
Champ in-the-making
I am uploading a new image to Alfresco via CMIS (using PHP client from Apache).  It uploads fine but the Mime type is set to 'Unknown' in Alfresco.  This renders the image useless until I edit the mime type property via Share.

Has anyone else encountered this?  Is there any way to fix this?

I can query Alfresco via CMIS and the CMIS object properties show me that the document does indeed have a image/jpeg mime type.  But this is not reflected in Alfresco Share properties.
After editing the properties in Alfresco and choosing the correct mime type the image becomes viewable etc.  Looking at the object properties retrieved by CMIS there was no change whatsoever.

Any help is much appreciated.

I'm using Alfresco 5.0.c

3 REPLIES 3

jpotts
World-Class Innovator
World-Class Innovator
Have you tried uploading your image using the OpenCMIS Workbench using the exact same service URL and binding? If so, does it fail or does it set the mimetype correctly? If it works via Workbench it must be something you are doing differently in your code.

Jeff

bdaniel
Champ in-the-making
Champ in-the-making
Thanks Jeff, Yes I was able to upload via OpenCMIS Workbench with no problems except I couldn't use the URL ending cmis/versions/1.1/atom.  I had to change it to cmis/versions/1.0/atom other wise I get an error from Workbench (see attached screenshot). Any idea what that might be?

Anyway, I had some whitespace / empty lines at the start & end of my query templates.  Once I removed that all worked fine in PHP.

ememic
Champ in-the-making
Champ in-the-making
I'm experiencing a similar issue at the moment.
I'm using drupal <a href="https://www.drupal.org/project/cmis">CMIS API</a> module and when i upload files to alfresco the mime type is set to unknown in share. Yet the mime type is getting recognized from drupals end.

The module is using the apache chemistry php cmis client:
https://chemistry.apache.org/php/phpclient.html

What is this whitespace / empty lines issue you've encountered? I'm assuming that i might be experiencing similar issues on my end.

Thanks