Multipart Form Upload Block

Modified on Thu, 27 Nov at 8:44 AM

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

  1. Open your workflow.

  2. Open the block palette.

  3. Select Outputs > Multipart Form Upload.

  4. 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

  1. Open the block options dialog.

  2. Click the three dots menu in the top right.

  3. Select Unlock Custom Block Design.

  4. 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:

  1. Use the File Attributes block to scan a directory

  2. Extract the file names or full file paths

  3. Pass these into a For Each block

  4. 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

Let us know how can we improve this article!

Select at least one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article