Ensuring that your API reliably transfers data is a crucial component of quality. In mabl, you can create tests that upload files with "formdata" and "binary" request types. Upon saving the API test, any new files are uploaded to mabl cloud for test execution. You can manage file uploads from your mabl workspace: Configuration > File uploads.
This article explains how to upload files in formdata and binary request types.
By default, file uploads are supported up to 100 MB.
The maximum filename limit is 255 ASCII characters. However, if the filename includes non-ASCII characters the limit may be as low as 84 characters, depending on character encoding and the 255 bytes available for filenames.
File uploads in formdata requests
To upload a file within a formdata request type, take the following steps:
- Click on "formdata" in the Body tab.
- Select "File" from the Type dropdown.
- Upload a local file or choose an existing file from your mabl workspace.
Uploading a file in a formdata request body
File uploads in binary requests
To upload a file within a binary request type, take the following steps:
- Select "binary" in the Body tab.
- Upload a local file or choose an existing file from your mabl workspace.
Uploading a file in a binary request body