HTTP Action Files
Learn how to handle file uploads in HTTP Actions using multipart/form-data encoding and the File tab mapping system.
Learn how to handle file uploads in HTTP Actions using multipart/form-data encoding and the File tab mapping system.
When a File slot is resolved in a plugin, the file is not sent in the HTTP request body. Instead, it is passed as a dedicated file argument using the encoding method required by the target API. This is handled automatically by the HTTP Action editor via the File tab.
The File tab constructs a file dictionary where:
Only one file is ever included, even if multiple were selected in the UI.
This object is referenced in the File tab as file.
The data keyword is unnecessary when accessing your input argument in the File Mapping section
Use the File tab to map the incoming file to the API’s expected field name.

In the File tab, define:
The HTTP Action editor constructs this automatically from the File tab mapping.
Based on this cURL request to upload an attachment to a ServiceNow table
You need to fill up 3 fields:
You will need to map the file in the File tab:
And map the remaining fields in the Body tab:
To send the base64 encoded string of the file, you will need to follow the same steps by mapping the file in the File tab and pass the base64 content in the Body of the request with the following syntax files.file_input_arg_name.content
Based on an API that requires the following fields:
You will map the file in the File tab:
And map the remaining fields and content in the Body tab:
Important: The key you access within files must match the key you mapped in the File tab. In the example above, we use files.file.content because we mapped the key as file in the File tab. If you had mapped it to attachment instead, you would need to access it as files.attachment.content. The pattern is always files.[your_mapped_key].[property] where [property] can be content, file_name, or location.
One caveat is that this will create a new input_arg in your input arguments panel. Make sure to delete that dummy argument there.
Callout: The uploaded filename is fixed to file.file_name at upload time.
You cannot change it via the File tab.
Send filename separately in JSON body:
cURL Equivalent (Generated Internally)
For an HTTP action with:
POST https://upload.example.com/submit{ "user": "john" }doc → fileTEST button — check your service for the uploaded file.