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/12 22:40:49 UTC

[jira] Created: (CMIS-230) createDocument should accept a string instead of a file object. (Or have alternate version)

createDocument should accept a string instead of a file object. (Or have alternate version)
-------------------------------------------------------------------------------------------

                 Key: CMIS-230
                 URL: https://issues.apache.org/jira/browse/CMIS-230
             Project: Chemistry
          Issue Type: Improvement
          Components: cmislib
            Reporter: Jeff Potts
            Assignee: Jeff Potts
            Priority: Minor


Migrated from GC issue #9, Reported by bdkahn, Mar 17, 2010

createDocument(name, properties={}, contentFile=None, contentType=None, 
contentEncoding=None)

should accept a string for contentFile since the underlying code is simply 
calling read().encode anyway.

The python program may have generated the content itself and should be able 
to upload that file via CMIS rather than needing to save the file and then 
uploading it.


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


[jira] Commented: (CMIS-230) createDocument should accept a string instead of a file object. (Or have alternate version)

Posted by "Jeff Potts (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CMIS-230?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12928278#action_12928278 ] 

Jeff Potts commented on CMIS-230:
---------------------------------

Manuel,

In thinking about this, rather than add code to deal with this, I wonder if it isn't better for people to just wrap their strings in a StringIO, like this:

pwc.setContentStream(StringIO(someContent), 'text/plain')

Jeff

> createDocument should accept a string instead of a file object. (Or have alternate version)
> -------------------------------------------------------------------------------------------
>
>                 Key: CMIS-230
>                 URL: https://issues.apache.org/jira/browse/CMIS-230
>             Project: Chemistry
>          Issue Type: Improvement
>          Components: cmislib
>            Reporter: Jeff Potts
>            Assignee: Jeff Potts
>            Priority: Minor
>
> Migrated from GC issue #9, Reported by bdkahn, Mar 17, 2010
> createDocument(name, properties={}, contentFile=None, contentType=None, 
> contentEncoding=None)
> should accept a string for contentFile since the underlying code is simply 
> calling read().encode anyway.
> The python program may have generated the content itself and should be able 
> to upload that file via CMIS rather than needing to save the file and then 
> uploading it.

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


[jira] Commented: (CMIS-230) createDocument should accept a string instead of a file object. (Or have alternate version)

Posted by "Manuel Jesús Recena Soto (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CMIS-230?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12923429#action_12923429 ] 

Manuel Jesús Recena Soto commented on CMIS-230:
-----------------------------------------------

Hi Jeff,

I started working on this issue.

Regards,

> createDocument should accept a string instead of a file object. (Or have alternate version)
> -------------------------------------------------------------------------------------------
>
>                 Key: CMIS-230
>                 URL: https://issues.apache.org/jira/browse/CMIS-230
>             Project: Chemistry
>          Issue Type: Improvement
>          Components: cmislib
>            Reporter: Jeff Potts
>            Assignee: Jeff Potts
>            Priority: Minor
>
> Migrated from GC issue #9, Reported by bdkahn, Mar 17, 2010
> createDocument(name, properties={}, contentFile=None, contentType=None, 
> contentEncoding=None)
> should accept a string for contentFile since the underlying code is simply 
> calling read().encode anyway.
> The python program may have generated the content itself and should be able 
> to upload that file via CMIS rather than needing to save the file and then 
> uploading it.

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


[jira] Commented: (CMIS-230) createDocument should accept a string instead of a file object. (Or have alternate version)

Posted by "Manuel Jesús Recena Soto (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CMIS-230?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12928537#action_12928537 ] 

Manuel Jesús Recena Soto commented on CMIS-230:
-----------------------------------------------

Hi, Jeff

I had thought to do that same but within a function.
What do we do?

Regards,

> createDocument should accept a string instead of a file object. (Or have alternate version)
> -------------------------------------------------------------------------------------------
>
>                 Key: CMIS-230
>                 URL: https://issues.apache.org/jira/browse/CMIS-230
>             Project: Chemistry
>          Issue Type: Improvement
>          Components: cmislib
>            Reporter: Jeff Potts
>            Assignee: Jeff Potts
>            Priority: Minor
>
> Migrated from GC issue #9, Reported by bdkahn, Mar 17, 2010
> createDocument(name, properties={}, contentFile=None, contentType=None, 
> contentEncoding=None)
> should accept a string for contentFile since the underlying code is simply 
> calling read().encode anyway.
> The python program may have generated the content itself and should be able 
> to upload that file via CMIS rather than needing to save the file and then 
> uploading it.

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