Skip to main content

Upload file

Send a file to a URL as a multipart form upload, optionally with extra form fields.

Command in the REST Web Service toolkit · id ooa.rest/upload_file · 37 inputs (2 required), 3 outputs

Inputs​

InputTypeRequiredDefaultWhat it is
Address (URL)StringYesAbsolute URL that accepts the upload, or a path when base_url (or a connection) gives the address. It may come from the vault; then only its scheme and host are logged (G6).
PathFileYesFile to upload.
Field nameStringNofileForm field name the server expects for the file.
FormDictionaryNoOther form fields sent with the file.
MethodStringNoPOSTHTTP method.
QueryDictionaryNoQuery parameters, URL-encoded automatically.
HeadersDictionaryNoRequest headers.
Basic userStringNoBasic auth user name.
Basic passwordCredentialNoBasic auth password from the vault.
Bearer tokenCredentialNoBearer token from the vault.
Timeout (seconds)NumberNo600Response timeout.
Fail on errorBooleanNotrueRaise REST.HTTP_ERROR on 4xx/5xx.
Allow untrusted certificatesBooleanNofalseAccept any server certificate (self-signed or expired); for test systems only.
ProxyStringNoProxy server as host:port; the runner's settings when empty.
Proxy userStringNoProxy user name, when the proxy needs a sign-in.
Proxy passwordCredentialNoProxy password from the vault.
Client certificateFileNoClient certificate (.p12 or .pfx) for servers that require mutual TLS.
Client certificate passwordCredentialNoPassword of the client certificate file.
Windows sign-inStringNoWindows sign-in (NTLM or Kerberos) for intranet sites, SharePoint on premises, IIS and Exchange: current_user signs in as the runner's Windows account (Windows runners); user_password uses basic_user (DOMAIN\user) and basic_password.
OAuth token address (URL)StringNoOAuth 2.0 token endpoint; the request is sent with a token fetched there (kept for the run and renewed before it expires).
OAuth client IDStringNoOAuth 2.0 client (application) id.
OAuth client secretCredentialNoOAuth 2.0 client secret from the vault; needed for client credentials, optional with a refresh token.
OAuth refresh tokenCredentialNoRefresh token from the vault: signs in with the refresh-token grant instead of client credentials. A new refresh token from the server is used for the rest of the run and returned as refresh_token.
OAuth scopeStringNoScopes to ask for, separated by spaces.
OAuth audienceStringNoAudience sent to the token endpoint (some providers, e.g. Auth0, need it).
OAuth resourceStringNoResource sent to the token endpoint (e.g. Microsoft Entra v1 and AD FS).
OAuth client sign-inStringNobasicHow the client id and secret reach the token endpoint: basic (HTTP Basic header, the OAuth standard) or body (form fields client_id and client_secret).
OAuth 1.0a consumer keyStringNoOAuth 1.0a consumer key: the request is signed (RFC 5849).
OAuth 1.0a consumer secretCredentialNoOAuth 1.0a consumer secret from the vault.
OAuth 1.0a tokenCredentialNoOAuth 1.0a access token from the vault; empty for a consumer-only (two-legged) request.
OAuth 1.0a token secretCredentialNoOAuth 1.0a token secret from the vault.
OAuth 1.0a signature methodStringNoHMAC-SHA1OAuth 1.0a signature method.
Windows user nameStringNoWindows (NTLM) user name for intranet sites, IIS, SharePoint on premises and Exchange.
Windows domainStringNoWindows domain of the NTLM user; empty when the user name already has it (DOMAIN\user or user@domain).
Windows passwordCredentialNoWindows password of the NTLM user, from the vault.
Endpoint addressStringNoAddress the URL is relative to, so the URL can be a path such as /invoices/42; a saved connection usually gives it.
Trust certificateFileNoCertificate of a private certificate authority (.cer, .crt or .pem) to trust as well as the usual ones, so a company server's certificate is still checked without insecure_tls (G6).

Outputs​

OutputTypeWhat it is
statusNumberHTTP status code.
bodyStringResponse text.
jsonAnyParsed JSON body, or empty.