[ 
https://issues.apache.org/jira/browse/CMIS-629?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13579291#comment-13579291
 ] 

Florian Müller commented on CMIS-629:
-------------------------------------

Isn't that something the repository connector implementation should do? The 
OpenCMIS framework could only guess and could be wrong. Also, the connector 
implementation then couldn't distinguish if the client sets the MIME type or if 
the OpenCMIS framework guessed.

I think it would be safer to let the connector implementation check if the MIME 
type is null. If so, the implementation could do the guessing - either by using 
the helper classes OpenCMIS provides or by doing something more sophisticated, 
for example by using Tika.

                
> Use filename extension to derive mime type is Content-Type header is missing 
> when setting content stream
> --------------------------------------------------------------------------------------------------------
>
>                 Key: CMIS-629
>                 URL: https://issues.apache.org/jira/browse/CMIS-629
>             Project: Chemistry
>          Issue Type: Improvement
>          Components: opencmis-server
>    Affects Versions: OpenCMIS 0.8.0
>            Reporter: Gavin Cornwell
>
> If you omit the Content-Type header from a PUT request to update content the 
> content is updated successfully but the mime type gets reset (although i 
> guess this could be implementation dependent).
> If the request has provided the Content-Disposition header with a filename it 
> should be possible to derive the mime type from the file extension rather 
> than leaving it empty.
>  

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to