Show examples in:
Javascript HTTP

Content Management API > Upload

Upload

Every file you upload to DatoCMS will be retrievable from this endpoint.

Object payload

id string

RFC 4122 UUID of upload expressed in URL-safe base64 format

Example: "q0VNpiNQSkG6z0lif_O1zg"
type string

Must be exactly "upload".

attributes.size integer

size of the upload

Example: 444
attributes.width null, integer

Width of image

Example: 30
attributes.height null, integer

Height of image

Example: 30
attributes.path string

Upload path

Example: "/45/1496845848-digital-cats.jpg"
attributes.basename string

Upload basename

Example: "digital-cats"
attributes.filename string

Upload filename

Example: "digital-cats.jpg"
attributes.url string

Upload URL

Example: "https://www.datocms-assets.com/45/1496845848-digital-cats.jpg"
attributes.format string, null

Format

Example: "jpg"
attributes.author string, null

Author

Example: "Mark Smith"
attributes.copyright string, null

Copyright

Example: "2020 DatoCMS"
attributes.notes string, null

Notes

Example: "Nyan the cat"
attributes.md5 string

The MD5 hash of the asset

Example: "873c296d0f2b7ee569f2d7ddaebc0d33"
attributes.duration integer, null

Seconds of duration for the video

Example: 62
attributes.frame_rate integer, null

Frame rate (FPS) for the video

Example: 30
attributes.blurhash string, null

Blurhash for the asset

Example: "LEHV6nWB2yk8pyo0adR*.7kCMdnj"
attributes.thumbhash string, null

Base64 encoded ThumbHash for the asset

Example: "UhqCDQIkrHOfVG8wBa2v39z7CXeqZWFLdg=="
attributes.mux_playback_id string, null

Public Mux playback ID. Used with stream.mux.com to create the source URL for a video player.

Example: "a1B2c3D4e5F6g7H8i9"
attributes.mux_mp4_highest_res enum, null

Maximum quality of MP4 rendition available

Example: "high"
high
medium
low
attributes.default_field_metadata object

For each of the project's locales, the default metadata to apply if nothing is specified at record's level.

Example: { en: { title: "this is the default title", alt: "this is the default alternate text", custom_data: { foo: "bar" }, focal_point: { x: 0.5, y: 0.5 }, }, }
attributes.is_image boolean

Is this upload an image?

attributes.created_at

Date of upload

Type: null, date-time
attributes.updated_at

Date of last update

Type: null, date-time
attributes.mime_type null, string

Mime type of upload

Example: "image/jpeg"
attributes.tags

Tags

Type: Array<string>
Example: ["cats"]
attributes.smart_tags

Smart tags

Type: Array<string>
Example: ["robot-cats"]
attributes.exif_info object

Exif information

Example: { iso: 10000, model: "ILCE-7", flash_mode: 16, focal_length: 35, exposure_time: 0.0166667, }
attributes.colors

Dominant colors of the image

Type: Array<object>
Example: [ { red: 206, green: 203, blue: 167, alpha: 255 }, { red: 158, green: 163, blue: 93, alpha: 255 }, ]
red integer

Red value (from 0 to 255)

Example: 115
green integer

Green value (from 0 to 255)

Example: 133
blue integer

Blue value (from 0 to 255)

Example: 27
alpha integer

Alpha value (from 0 to 255)

Example: 255
relationships.creator.data

The entity (account/collaborator/access token) who created the asset

relationships.upload_collection.data

Upload collection to which the asset belongs

Available endpoints