You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@chemistry.apache.org by "Jeff Potts (JIRA)" <ji...@apache.org> on 2010/07/13 17:20:50 UTC

[jira] Commented: (CMIS-231) setContentStream sets document mime type to application/atom+xml

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

Jeff Potts commented on CMIS-231:
---------------------------------

Confirmed:
>>> contentFile = open('sample.html', 'rb')
>>> doc = folder.createDocument('test.html', contentFile=contentFile)
>>> contentFile.close()
>>> doc.name
u'test.html'
>>> doc.properties['cmis:contentStreamMimeType']
u'text/html'
>>> pwc = doc.checkout()
>>> contentFile = open('sample.html', 'rb')
>>> pwc.setContentStream(contentFile)
<cmislib.model.Document object at 0x1006f4250>
>>> contentFile.close()
>>> updatedDoc = pwc.checkin()
>>> updatedDoc.name
u'test.html'
>>> updatedDoc.properties['cmis:contentStreamMimeType']
u'application/atom+xml'

> setContentStream sets document mime type to application/atom+xml
> ----------------------------------------------------------------
>
>                 Key: CMIS-231
>                 URL: https://issues.apache.org/jira/browse/CMIS-231
>             Project: Chemistry
>          Issue Type: Bug
>          Components: cmislib
>            Reporter: Jeff Potts
>            Assignee: Jeff Potts
>
> Migrated from GC issue #10, Reported by bdkahn, Mar 23, 2010
> What steps will reproduce the problem?
> 1. create an HTML document with createDocument
> 2. update contents using setDocumentStream
> What is the expected output? What do you see instead?
> HTML document no longer has the text/html mime type, but instead is 
> application/atom+xml
> What version of the product are you using? On what operating system?
> 0.3dev on Fedora 12 x86_64
> Please provide any additional information below.
> Looks like:
>         # build the Atom entry
>         #xmlDoc = self._getEntryXmlDoc(contentFile=contentFile)
>         # post the Atom entry
>         result = self._cmisClient.put(srcUrl, contentFile.read(), 
> ATOM_XML_TYPE)
>         if type(result) == HTTPError:
>             raise CmisException(result.code)
> is the problem

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.