Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
CMIS upload test script
import cmislib
client = cmislib.CmisClient('http://127.0.0.1:8080/alfresco/api/-default-/public/cmis/versions/1.1/atom', 'Admin', 'alfresco')
repo = client.defaultRepository
root = repo.rootFolder
myFolder = root.createFolder('testFolder')
f1 = open('C:\\test_4.pdf', 'rb')
#f2 = open(''.pdf, 'rb')
#f3 = open(''.pdf, 'rb')
myFolder.createDocument('1.pdf', contentFile=f1)
#subFolder.cerateDocument('2.pdf', contentFile=f2)
#subFolder.cerateDocument('3.pdf', contentFile=f3)
f1.close()
#f2.close()
#f3.close()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment