Skip to content

Instantly share code, notes, and snippets.

@jkariscodes
Created December 7, 2020 06:03
Show Gist options
  • Save jkariscodes/91d123948aaa4f5dcb5836092a8e8f4b to your computer and use it in GitHub Desktop.
Save jkariscodes/91d123948aaa4f5dcb5836092a8e8f4b to your computer and use it in GitHub Desktop.
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