Skip to main content
Attaching a file to a test case? Use test_cases.upload_input_file() or pass input_file_paths to test_cases.create() instead: both call this method for you and return the reference in the shape a test case expects. Reach for this method directly to store a file for another purpose, or when you need the raw URI rather than an InputFile.

Returns

Returns the URI the file is stored under. It still carries the upload’s signature and expires; the API replaces it with the canonical, signature-free reference wherever it is persisted.

Example

Parameters

string
required
Path to the file on the machine running the SDK.
string
default:"file"
What the file is for, which decides the folder it is stored under and who may read it. The default, "file", is a test case input attachment. The platform also accepts "groundTruth", "testFile", "testCaseExport", "dataCatalog" and "audio".
string
The name the platform records the object under. Defaults to the file’s own name.

Errors

A failed upload raises an error naming the file and the cause. The message never contains the presigned link, which grants write access to that object for 24 hours.