Data Types

DownloadFileParams

Parameter object passed to the DownloadFile method in the Bytescale SDKs.

{
"accountId": String,
"cache": Boolean,
"cache_ttl": Number,
"cache_ttl_404": Number,
"filePath": String,
"version": String
}
{
"accountId": "YOUR_ACCOUNT_ID",
"cache": true,
"cache_ttl": 31536000,
"cache_ttl_404": 31536000,
"filePath": "/uploads/image.jpg",
"version": "1"
}

Your account ID.

This is visible on the settings page:

https://www.bytescale.com/dashboard/settings

Example: "A623uY2"

Type: String

Length: 7

Specifies whether to cache the raw file in the Bytescale CDN.

Default: true

Type: Boolean

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

Absolute path to a file. Begins with a /.

Example: "/uploads/image.jpg"

Type: String

Min Length: 1

Max Length: 512

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

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: