To download files:
https://upcdn.io/{accountId}/raw/{filePath}
For example:
You must authenticate your requests when downloading private files.
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.
Your account ID.
This is visible on the settings page:
https://www.bytescale.com/dashboard/settings
Example: "A623uY2"
Type: String
Length: 7
Absolute path to a file. Begins with a /.
Example: "/uploads/image.jpg"
Type: String
Min Length: 1
Max Length: 512
Specifies the maximum amount of time, in seconds, the file will be cached on the user's device and in the Bytescale CDN's edge cache.
Default: Please refer to your account's default cache settings in the Bytescale Dashboard.
Type: Number
Specifies the maximum amount of time, in seconds, that 404 responses will be cached in the Bytescale CDN's edge cache.
Default: Please refer to your account's default cache settings in the Bytescale Dashboard.
Type: Number
Forces the browser to display a download prompt for the file, instead of displaying the file in the browser.
When set to true, the Bytescale CDN will add a content-disposition: attachment header to the HTTP response.
Example: true
Type: Boolean
Downloads the latest version of your file (if you have overwritten it) when added to the URL with a unique value.
The value of the version parameter 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.
Example: "1"
Type: String
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 with apikey as your username and your API key as your password.
For advanced options, please see:
https://www.bytescale.com/docs/auth
Type: String
This website uses cookies. By continuing you are consenting to the use of cookies per our Cookie Policy. Our legal policies were last updated August 16 2024.
This website requires a modern web browser -- the latest versions of these browsers are supported: