Upload
Upload is a field that allows users on the form to upload files such as documents or images. It can be part of a template or you can add it from the generics tab.
How to set up upload API
First let's set an upload API. On the left panel go to API and create a new API connector.
In our example let's call it "Upload API" and let's create a call and name it "Upload".
The call method will be POST in our case, and we enter the API upload URL.
Also add a response for initialization. This can be found from your API response when you upload a file.
The body type depends on the API you are using, in our case this is FORM_DATA.
We will also need the following form data parameters resource
, mediaType
and alternateText
.
After adding this start you can start a test call and save the API connector.
Now we need to add our form data to the parameters in our API. You can select all the values from the dropdown when you click Multimedia
.
We will bind resource
to file
, mediaType
to fileType
, and alternateText
to fileName
.
The only thing left is to bind the upload API to the Upload field. We do this by selecting the field and going to "Content" on the property panel.
Here find "Upload" and select your upload API call from the dropdown.
Bind the fields uri
to href
, mediatype
to mimeType
and alternatetext
to fileName
and you are done.
For more details please see the video below.