Upload files to external APIs using multipart form data.
This article explains how to use the Multipart Form Upload custom block in Omniscope to send files to external systems using multipart form data. This is useful when integrating with APIs that expect uploads in the same format as Postman or similar tools.
It is ideal for workflows where an external system generates a file and Omniscope is responsible for posting it to a remote API endpoint.
When to use this block
Use the Multipart Form Upload block when:
The target API expects a multipart form data request.
You need to submit a file and additional fields in a multipart structure.
Other blocks do not meet your requirements.
File Output block performs a PUT request and writes the file directly.
Batch HTTP block does not support multipart form data and cannot construct multipart bodies.
Adding the block to your workflow
Open your workflow.
Open the block palette.
Select Outputs > Multipart Form Upload.
Place the block anywhere in your workflow.
Configuring the block options
The block contains simple configuration options.
Upload URL
Enter the API endpoint where the file should be posted.
File path
Browse to the local or embedded file that you want to upload.
Form field name
Most APIs expect the file under the field name file.
If your API uses a different name, update it here.
Additional form fields (optional)
You can add extra form fields if your API requires them.
Adding authentication or custom headers
If your API requires an API key or any custom header, you can add it directly inside the script.
How to edit the script
Open the block options dialog.
Click the three dots menu in the top right.
Select Unlock Custom Block Design.
Scroll to the top of the script and modify the CUSTOM_HEADERS dictionary.
CUSTOM_HEADERS = {
"ApiKey": "23423423"
}Multiple files upload
If you need to upload several files automatically, Omniscope provides a clean pattern for this.
If you want Omniscope to detect all files in a folder:
Use the File Attributes block to scan a directory
Extract the file names or full file paths
Pass these into a For Each block
Use the Multipart Form Upload block inside the loop to upload each file individually
This pattern is ideal for bulk uploads, automated inbox processing, or scheduled integrations where new files appear in a monitored directory.
Was this article helpful?
That’s Great!
Thank you for your feedback
Sorry! We couldn't be helpful
Thank you for your feedback
Feedback sent
We appreciate your effort and will try to fix the article