Help Centre › Building Processes
This article describes the RPA HTTP functionality to upload a file via HTTP.
For a full list of available functions, please read HTTP functions.
Description
The Upload file via HTTP function uploads a file as multipart form data to a URL. You can include additional form data alongside the file upload.
Setting it up
To use the Upload file via HTTP function, follow these instructions:
{{popups:rpas/add:action=api-upload}}
Once on a process map:
- Navigate to the process where you would like to add the Upload file via HTTP function
- Click on the green button's drop-down (right side of the green button labelled "Process")
- On the menu that appears, click on the "+ Activity" item
- From here you can select the Upload file via HTTP option
- Click "Add" once you are done
Input parameters
| Parameter | Required | Type | Default | Description |
|---|---|---|---|---|
| Name | No | Text | - | The alias of a previously created session (from api-session) |
| URL | Yes | Text | - | The URL to upload the file to |
| Path | Yes | Text | - | The local file path of the file to upload |
| Field name | No | Text | file | The form field name for the file (must match the API's expected field) |
| Data | No | JSON | - | Additional form data to include with the upload as key-value pairs |
| Headers | No | JSON | - | Additional headers for this request |
| Timeout | No | Number | - | Request timeout in seconds |
| Variable | No | Text | response | Variable name to store the response |
Output variables
| Variable | Type | Description |
|---|---|---|
| {response} | Object | The server response object |
Errors
| Error | Description |
|---|---|
| File not found | The specified file does not exist at the given path |
| Connection failed | Unable to establish a connection to the server |
| Upload rejected | The server rejected the file upload |
Tips
- Use the field_name parameter to match the API's expected form field name
- Add extra form data with the data parameter for metadata such as descriptions or tags
- Increase timeout for large file uploads