Using Multipart Encoded Content for files with CallRESTEndpoint

If you need to send a file over a Multi-part encoded Content in a REST API, you will need to convert the file to binary first, then send that binary in the Mult-part Endoded body.

The API may look something like this:

First retrieve the binary for the file you need to sent. Do this by using the BinaryFileRead function (in the File plugin)

Then send that binary in the Multi-part encoded body setting.

Please note:

When using a Binary file:

  • binary content is accepted (see the Value field in the ‘myfile’ example above)
  • the File Name must be specified

When using a Base64 file:

  • a string value is accepted (see the Value field in the ‘somedata’ example above)
  • the File Name must not be specified

More detail available in the documentation: Call REST Endpoint (50%) (linx.software)