How to handle request payloads larger than 5MB
Learn how to use the HTTP File Trigger to process payloads exceeding 5MB in your pipeline.
Both REST and HTTP triggers have a payload limit of 5MB. If this limit is reached, the Platform returns the HTTP status "413" with the following message:
{
"message": "Request size limit exceeded"
}
Below you can find out more about an alternative method for handling requests that exceed the payload limit.
Step-by-step guide for handling requests larger than 5MB
Use the HTTP File Trigger
You can use the HTTP File Trigger to process payloads larger than 5MB by sending the data as a file.
Specify the appropriate content type for your file under Body Upload and Response Content-Types. In this example, the value is application/json
, but it can also be other formats, such as application/pdf
or application/jpeg
.

After receiving the payload with the HTTP File Trigger, you can access the Monitor page to see the Execution Details. Note that the payload is received as a file and not in the body key. In this context, the body key is empty.


Save the input data in the Session Management connector
Special handling is required to access the uploaded file. A common approach is to store the request’s input data in a Session Management connector, preserving details such as Headers
and QueryAndPath
.

Convert the string into JSON
Use the File Reader connector to read the file and convert it into a JSON string. Then, apply the Double Braces TOJSON
function to transform it into a JSON object.
In this example, the conversion takes place in the JSON Generator connector, named "TOJSON data", as illustrated in the image below.

Configure the response of the pipeline
Once you have obtained the desired payload, you need to prepare the pipeline's response. You can return either a .json
file or a JSON object.
To generate a file, use the File Writer connector:

Alternatively, you can use a JSON Generator connector to structure and provide the final response, as shown in the following example:

Last updated
Was this helpful?