Show examples in:
JavascriptHTTP
Content Management API > Upload

Upload

Each media object you upload to the Media Area of your DatoCMS project is represented as an upload entity.

Object payload

idstring

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

Example:"q0VNpiNQSkG6z0lif_O1zg"
typestring

Must be exactly "upload".

attributes.sizeinteger

size of the upload

Example:444
attributes.widthnull, integer

Width of image

Example:30
attributes.heightnull, integer

Height of image

Example:30
attributes.pathstring

Upload path

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

Upload basename

Example:"digital-cats"
attributes.filenamestring

Upload filename

Example:"digital-cats.jpg"
attributes.urlstring

Upload URL

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

Format

Example:"jpg"
attributes.authorstring, null

Author

Example:"Mark Smith"
attributes.copyrightstring, null

Copyright

Example:"2020 DatoCMS"
attributes.notesstring, null

Notes

Example:"Nyan the cat"
attributes.md5string

The MD5 hash of the asset

Example:"873c296d0f2b7ee569f2d7ddaebc0d33"
attributes.durationinteger, null

Seconds of duration for the video

Example:62
attributes.frame_rateinteger, null

Frame rate (FPS) for the video

Example:30
attributes.blurhashstring, null

Blurhash for the asset

Example:"LEHV6nWB2yk8pyo0adR*.7kCMdnj"
attributes.thumbhashstring, null

Base64 encoded ThumbHash for the asset

Example:"UhqCDQIkrHOfVG8wBa2v39z7CXeqZWFLdg=="
attributes.mux_playback_idstring, 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_resenum, null

Maximum quality of MP4 rendition available

Example:"high"
high
medium
low
attributes.default_field_metadataobject

Per-asset default metadata applied when no record-level overrides are present. alt, title, and custom_data are objects keyed by locale; focal_point (image assets) and poster_time (video assets) are a single value per asset. See non-localized focal points for more info.

Example:{ alt: { en: "this is the default alternate text" }, title: { en: "this is the default title" }, custom_data: { en: { foo: "bar" } }, focal_point: { x: 0.5, y: 0.5 }, poster_time: 12.5, }
altobject

Alternate text per locale

Example:{ en: "Alternate text" }
titleobject

Title per locale

Example:{ en: "Title" }
custom_dataobject

Object with arbitrary metadata, per locale

Example:{ en: { add_watermark: true } }
focal_pointobject, null

Focal point (only for image assets)

xnumber

Horizontal position expressed as float between 0 and 1

Example:0.5
ynumber

Vertical position expressed as float between 0 and 1

Example:0.5
poster_timenumber, null

Poster time in seconds (only for video assets). Float seconds into the video used to generate the thumbnail; null uses Mux's default (middle of the video)

Example:12.5
attributes.is_imageboolean

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_typenull, 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_infoobject

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 }, ]
redinteger

Red value (from 0 to 255)

Example:115
greeninteger

Green value (from 0 to 255)

Example:133
blueinteger

Blue value (from 0 to 255)

Example:27
alphainteger

Alpha value (from 0 to 255)

Example:255
meta.antivirusobject

Antivirus scan information

statusenum

Antivirus scan status of the asset

Example:"clean"
pending
clean
infected
failed
skipped
checked_at

Date of the last antivirus scan

Type:date-time, null
threat_namestring, null

Name of the threat detected by the antivirus scan, if any

relationships.creator.data

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

Type:<a href="/docs/content-management-api/resources/account">ResourceLinkage&#x3C;"account"></a>, <a href="/docs/content-management-api/resources/access_token">ResourceLinkage&#x3C;"access_token"></a>, <a href="/docs/content-management-api/resources/user">ResourceLinkage&#x3C;"user"></a>, <a href="/docs/content-management-api/resources/sso_user">ResourceLinkage&#x3C;"sso_user"></a>, <a href="/docs/content-management-api/resources/organization">ResourceLinkage&#x3C;"organization"></a>
relationships.upload_collection.data

Upload collection to which the asset belongs

Type:<a href="/docs/content-management-api/resources/upload_collection">ResourceLinkage&#x3C;"upload_collection"></a>, null

Available endpoints