I’m trying to display an image which I have uploaded as part of the deployment in Cockpit on an embedded form.
I noticed two issues:
When I download the image from Camunda after deployment, I find that the file cannot be opened. It says the file is corrupted. Is there something wrong with the upload and how to rectify this?
I came across numerous articles to display the image in an embedded form, but I seem to be hitting a wall since none of this displays the image. I doubt if it has to do with the above issue.
Yes. I already tried this. The error is as follows:
**Communication Error** **:** The application received an unexpected 400 response from the server. Try to refresh the page or login and out of the application.
**Form failure:** $http.get(...).success is not a function
**Communication Error** **:** The application received an unexpected 400 response from the server. Try to refresh the page or login and out of the application.
I tried to recreate it locally and I can’t reproduce it. The Request URL should look something like this: http://localhost:8080/camunda/api/engine/engine/default/task/732279fa-b43b-11e9-8f3a-0242300cc66b/form.
Also check if the JSESSIONID and XSRF-TOKEN are valid (i.e. match the requests generated by tasklist)
Is this also applicable for a scenario where the logo.png file is deployed from Cockpit along with the BPMN file and HTML forms?
Or will the Request Url be different?
I just checked how cockpit deploys resources. It seems that the encoding is always ‘text/xml’, which probably breaks pictures (related ticket).
However, the request Url should be the same (the ID after task/ will be different). The contextPath is null as you deployed it using the REST API and not as a war. So the request described in your first Post was the correct approach in the first place. Sorry for the confusion.
There are 3 options that I can think of:
Try the deployment using the REST API with an external REST client, so the picture does not get corrupted