To download files via the browser:
https://upcdn.io/{accountId}/raw/{filePath}
For example:
For private files: you must append ?_auth=true to your URLs and have a valid JWT cookie (see: authorization). Alternatively, you can download private files using API keys like in the examples below.
To download files using code:
1curl https://upcdn.io/{accountId}/raw/{filePath} \2 -H "Authorization: Bearer YOUR_API_KEY"
1Binary response
The file's contents.
Path to a file hosted by your account.
Type: String
Length: 7
Example: A623uY2
In: Path
Required: Yes
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
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
Prevents the raw file from being cached by the Upload CDN.
Type: Boolean
Example: ?_cache=true
In: Querystring
Required: No
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
Downloads the latest version of your file (if you have overwritten it) 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 overwrite your file.
The alias _v is also supported.
Type: String
Example: ?_version=1
In: Querystring
Required: No
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
This website uses cookies. By continuing you are consenting to the use of cookies per our cookie policy.
This website requires a modern web browser -- the latest versions of these browsers are supported: