Data Types

ProcessFile

To process files via the browser:

https://upcdn.io/{accountId}/{transformation}/{filePath}

For example:

https://upcdn.io/W142hJk/thumbnail/example/image.jpg

To create transformations: use the transformations page.

For private files: you must append ?_auth=true to your URLs and have a valid JWT cookie (see: authorization). Alternatively, you can process private files using API keys like in the examples below.

To process files using code:

GET https://upcdn.io/{accountId}/{transformation}/{filePath}
cURL
1curl https://upcdn.io/{accountId}/{transformation}/{filePath} \
2 -H "Authorization: Bearer YOUR_API_KEY"
Response (200)
1Binary response

Response Body

The file's contents.

URL Parameters

accountId

Path to a file hosted by your account.

Type: String

Length: 7

Example: A623uY2

In: Path

Required: Yes

filePath

Absolute path to a file. Must begin with a /.

Type: String

Min Length: 1

Max Length: 512

Example: /uploads/image.jpg

In: Path

Required: Yes

transformation

The name — or "URL slug" — of the transformation you would like to use.

These are listed on the Transformations page in the Upload Dashboard:

https://upload.io/dashboard/transformations

Type: String

Min Length: 1

Max Length: 100

Example: thumbnail

In: Path

Required: Yes

_artifact

Some transformations output multiple files, called artifacts.

You can download a transformation artifact by specifying its path using this parameter.

Type: String

Example: ?_artifact=/example/video/part-a.ts

In: Querystring

Required: No

_auth

Must be set when using JWT cookies to download private files.

Do not include this parameter otherwise.

Default: false

Type: Boolean

Example: ?_auth=false

In: Querystring

Required: No

_cache

Prevents the response from being cached.

Transformation will be executed on every request.

Important: do not use this parameter when serving files to your users, since the re-execution of Upload's transformation pipelines on every request will result in higher download latencies.

Recommendation: use the _version parameter to "cache bust" instead.

Type: Boolean

Example: ?_cache=true

In: Querystring

Required: No

_download

Forces the browser to display a download prompt (instead of rendering the file in a browser window).

Type: Boolean

Example: ?_download=true

In: Querystring

Required: No

_version

Re-runs your transformation (after you have made configuration changes) when added to the URL with a unique value.

The value can be anything, e.g. an incremental number, a timestamp, etc.

You only need to provide and update this value if/when you make changes to your transformation's configuration.

The alias _v is also supported.

Type: String

Example: ?_version=1

In: Querystring

Required: No

Request Headers

Authorization

Add one of these Authorization header values to your request:

Option 1: prefix "Bearer " to your API key. The result is your Authorization header value.

Option 2: use HTTP basic authorization, specifying apikey as your username, and your API key as your password.

Type: String

In: Header

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: