Data Types

UploadManagerParams

Parameter object passed to the UploadManager.upload(params) method in the Upload SDKs.

Structure

Example

{
"accountId": "YOUR_ACCOUNT_ID",
"cancellationToken": {
"isCancelled": false
},
"data": "Hello World",
"maxConcurrentUploadParts": 2,
"metadata": {
"myCustomField1": true,
"myCustomField2": {
"hello": "world"
},
"anotherCustomField": 42
},
"mime": "image/jpeg",
"originalFileName": "example.jpg",
"path": {
"fileName": "image.jpg",
"fileNameVariablesEnabled": true,
"folderPath": "/uploads",
"folderPathVariablesEnabled": true
},
"protocol": "1.0",
"size": 11,
"tags": [
"images/profile"
]
}

Properties

accountId

Your account ID.

This is visible on the settings page:

https://upload.io/dashboard/settings

Type: String

Length: 7

Example: "A623uY2"

Required: Yes

cancellationToken

Cancellation token to allow the upload to be cancelled after it has started.

Type: CancellationToken

Required: No

data

The data to upload.

The supported types for this parameter vary between the different Upload SDKs.

Please refer to each SDK's documentation for this field's type.

Required: Yes

maxConcurrentUploadParts

Type: Number

Required: No

metadata

An arbitrary JSON object to store against the file as metadata.

You can retrieve this later via a GetFileDetails request.

Type: FileMetadata

Required: No

mime

The file's MIME type.

Type: String

Min Length: 3

Max Length: 255

Example: "image/jpeg"

Required: No

originalFileName

The file's original name on the user's device.

Type: String

Min Length: 1

Max Length: 255

Example: "example.jpg"

Required: No

path

The path to upload the file to.

Type: FilePathDefinition

Required: No

protocol

Multipart upload protocol version to use.

The latest Upload SDKs use the latest supported version.

Recommended: "1.1"

Default: "1.0"

Type: String

Allowed Values: "1.0", "1.1"

Required: No

size

Size of the file data being uploaded, in bytes.

Conditional: only include if both data is a stream.

Type: Integer

Minimum: 0

Example: 11

Required: No

tags

The file tags to store against the file.

When you associate file tags with a file, Upload checks which rules match the tags (if any) and applies those rules to the upload request:

Rules can include max file size checks, traffic limit checks, rate limit checks, and so forth. These are configured in the Upload Dashboard.

Type: String[]

Example: ["images/profile"]

Required: No

Was this section helpful? Yes No

You are using an outdated browser.

This website requires a modern web browser -- the latest versions of these browsers are supported: