Upload files via REST API

Hey folks :slight_smile:

in his videos Nial uses the REST API to upload his bpmn-Process.
Is although possible to upload a other file and attach it as a variable to a process instance?

I used the following REST API POST-Request:

Key = Content-Type
Value = application/pdf

Key = unterlagen
Value = path to the file

Unfortunaley it doesnt work …
Do you have any suggestions how to fix that?

Thank you very much!

Best wishes,

This docs page explains a little but here about how to complete user tasks with a file as a process variable.

Thanks Niall!
I already checked that out. But if I understand it correct, there is no parameter available to set a path to local file and I can only create empty files, right?

Hi @wienchma,

referencing the file location depends on your REST client. With curl, you can read here how to do it: https://medium.com/@petehouston/upload-files-with-curl-93064dcccc76.

In Postman, a small upload box next to the form field triggers a file selection dialogue.

Hope this helps, Ingo

1 Like