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.
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.
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.
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.