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 your mabl workspace to enable cloud runs.
Go to Configuration > File uploads to manage file uploads in your workspace.
This article explains how to upload files in formdata and binary request types.
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