How to generate preview of content load onto a workflow via ReST API

cancel
Showing results for 
Search instead for 
Did you mean: 
pedwards99
Partner

How to generate preview of content load onto a workflow via ReST API

Hi there,

I'm using the APS 1.11.0 REST API to add content to a process instance as follows:

http://localhost:9090/activiti-app/api/enterprise/process-instances/768072/raw-content

In the call I post a file that gets uploaded and I can see content attached to the process using:

http://localhost:9090/activiti-app/api/enterprise/process-instances/768072/content

{
   "id": 261284,
   "name": "MyTW_Bill_900011423716_26_07_2021-2.pdf",
   "created": "2021-08-06T09:50:34.655+0000",
   "createdBy": {
   "id": 1,
   "firstName": "Mr",
   "lastName": "Administrator",
   "email": "admin@app.activiti.com",
   "pictureId": 2002
},
   "relatedContent": false,
   "contentAvailable": true,
   "link": false,
   "mimeType": "application/pdf",
   "simpleType": "pdf",
   "previewStatus": "queued",
   "thumbnailStatus": "queued"
}
 
You can see at the bottom of the JSON that the previewStatus and thumbnailStatus are "queued".
 
What do I have to do to force APS to process this, change the status to "created" and therefore allow me to retrieve the preview rendition?
 
I have a custom Angualr app that is making the REST calls, but if I run the same call via Postman, APS still refuses to generate the preview. If I upload the same file via Activiti App then the preview is generated.
 
Thanks
Paul