UiPath Documentation
integration-service
2.2510
true
Integration Service user guide

Working with files

Upload files to a provider from a custom connector built with Connector Builder for Integration Service in Automation Suite, using multipart parameters.

Connectors built with Connector Builder can upload files to a provider. Uploads are configured on the API resource, as a multipart parameter, and surfaced as an activity input field. The HTTP Request activity does not support files, so it is not an alternative.

Uploading a file​

A file is uploaded through a parameter on the API resource. To configure one:

  1. In the Activity designer, open the resource and select the parameter that carries the file.
  2. Under Parameter settings, set Parameter type to multipart.
  3. Set Data type to file.

Connector Builder derives the request content type from the parameter: a resource that has a multipart parameter is sent as multipart/form-data, and a resource that does not is sent as application/json. You do not set the content type yourself.

A resource can mix locations. Alongside the file parameter you can keep parameters in the query, path, header, or body, and add further multipart parameters of other data types — for example a string parameter carrying the file name.

The parameter then appears as a file input on the generated activity, and in the Send Request dialog as a Choose file control, so you can test the resource before you publish.

Tip:

To inspect or modify the parts of a multipart request from a connector script, use the multipart_hook_context_items variable. For details, see Global scripts.

First-party connectors already ship this pattern — the Box connector uses a file-typed multipart parameter for its upload resources.

Known limitations​

  • Field generation: Connector Builder does not generate fields for a resource that has a multipart parameter, and says so in the Send Request dialog, under Generate resource fields. Define the fields for such a resource manually.
  • Request body editor: The request body editor accepts JSON. Multipart requests are expressed through parameters on the API resource.
  • Uploading a file​
  • Known limitations​

Was this page helpful?

Connect

Need help? Support(opens in new window)

Want to learn? UiPath Academy(opens in new window)

Have questions? UiPath Forum(opens in new window)

Stay updated