cancel
Showing results for 
Search instead for 
Did you mean: 

Uploading files with Author and Tags - cmislib

vk
Champ in-the-making
Champ in-the-making
Hello,
I'm trying to upload a file, but the cmislib doesn't have an option to include the "Author" field and tags.
Is there a way to do that with Python?

Thanks!
4 REPLIES 4

kaynezhang
World-Class Innovator
World-Class Innovator
You can use webscript api

mrogers
Star Contributor
Star Contributor
Usually the "author" field would be populated by metadata extraction from your uploaded content.

Anyway if you want to set the cm:author property via cmis that should be straightforward as long as you remember that it is on the cm:author aspect.   Aspects are handled in cmis 1.1  or there is a plugin for cmis 1.0.

If your requirement is to set a tag via cmis that is unfortunatly far harder due to the way that tags are implemented via a type d:content.  At the moment if you do want to automatically create a tag for the author I'd suggest a rule or a custom webscript.     

vk
Champ in-the-making
Champ in-the-making
Thank you for your replies!

Can the cm:author property be set through the Python cmislib?
If I am using the 4.2.f Community edition and connecting to http://localhost:8080/alfresco/service/cmis, what version of CMIS am I using?

And I didn't mean to add a tag for each author, but set the tags for each object uploaded along with the author aspect.

kaynezhang
World-Class Innovator
World-Class Innovator
cm:author property is a property of cm:author aspect,so if you want to add cm:author property to your node ,you should add cm:author aspect first.
I don't know whether Apache Chemistry cmislib 0.5.1 supports aspects(second type),but Alfresco cmislib extension dose support Alfresco aspects,please visit here http://ecmarchitect.com/archives/2012/01/27/1534.

As adding tags to node ,I don't think you can do it using cmislib,you should use alfreco webscript api directly.