Data Types

FileDetails

Contains full information about a file, including its file metadata, file tags, original file name, and MIME type.

{
"accountId": String,
"etag": String | Null,
"filePath": String,
"fileUrl": String,
"lastModified": Integer,
"mime": String,
"originalFileName": String | Null,
"size": Integer,
"tags": String[]
}
{
"accountId": "YOUR_ACCOUNT_ID",
"etag": "33a64df551425fcc55e4d42a148795d9f25f89d4",
"filePath": "/uploads/image.jpg",
"fileUrl": "https://upcdn.io/A623uY2/raw/uploads/image.jpg",
"lastModified": 1615680311115,
"metadata": {
"myCustomField1": true,
"myCustomField2": {
"hello": "world"
},
"anotherCustomField": 42
},
"mime": "image/jpeg",
"originalFileName": "example.jpg",
"size": 43182,
"tags": [
"example_tag"
]
}

Your account ID.

This is visible on the settings page:

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

Example: "A623uY2"

Type: String

Length: 7

The file's ETag, short for "entity tag", reflects the file's version and changes whenever the file is modified.

Example: "33a64df551425fcc55e4d42a148795d9f25f89d4"

Type: String | Null

Min Length: 1

Max Length: 255

The file's path.

We recommend you save this value to your database (instead of the file's URL).

This value always begins with a /.

Example: "/uploads/image.jpg"

Type: String

Min Length: 1

Max Length: 512

The file's raw URL (i.e. with no file transformations applied).

Example: "https://upcdn.io/A623uY2/raw/uploads/image.jpg"

Type: String

Min Length: 1

Max Length: 255

Time the file was uploaded or last overwritten. Epoch milliseconds (since midnight 1 January 1970, UTC).

Example: 1615680311115

Type: Integer

Minimum: 0

The file metadata specified in the original upload request as a JSON object.

Type: FileMetadata

File MIME type.

Example: "image/jpeg"

Type: String

Min Length: 3

Max Length: 255

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

Example: "example.jpg"

Type: String | Null

Min Length: 1

Max Length: 255

The size of the file in bytes.

Example: 43182

Type: Integer

Minimum: 0

The tags you specify here determine which rules will be executed for the upload.

You create rules in the Bytescale Dashboard, and choose which tags trigger each rule.

Rules include: max file size checks, traffic limit checks, rate limit checks, etc.

Example: ["example_tag"]

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: