Upload test

This page show you how to implement a File Upload in your Custom page.
Define a process with a Document variable, and create a case in this process. So, you need to have a the case id and the Document Name.
upload : Then, first upload a new file on the server using ngUpload. The BonitaEngine will return you a temporary file name.
Assign : The file name is give in the Assign part. Here the tips : firs call, a POST has to be done.
After, to update the content, a PUT has to be done, but with the documentId (which is an internal information), so a first call to get this documentId is necessary.
Upload a new content
{{uploadctrl.uploadstatus}}
CaseId
Document Name
File Name
Content Type
Server temporary Name

Url: [POST]/bonita/API/bpm/caseDocument
or
Url: [GET]/bonita/API/bpm/caseDocument?p=0&c=10&f=name={{uploadctrl.docname}}&f=caseId={{uploadctrl.caseid}}
Url: [PUT]/bonita/API/bpm/caseDocument/
{{uploadctrl.assignstatus}}
Get the Document information
CaseId

Url: [GET]/bonita/API/bpm/caseDocument?p=0&c=10&f=caseId={{uploadctrl.infoCaseId}}
{{uploadctrl.infoDoc}}

DocumentId Name Version File Name contentMimetype contentStorageId creationDate
{{oneDoc.id}} {{oneDoc.name}} {{oneDoc.version}} {{oneDoc.fileName}} {{oneDoc.contentMimetype}} {{oneDoc.contentStorageId}} {{oneDoc.creationDate}}