# Upload

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

## Object payload

**`id`**

- Type: string
- Example: `"q0VNpiNQSkG6z0lif_O1zg"`

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

**`type`**

- Type: string

Must be exactly `"upload"`.

**`size`**

- Type: integer
- Example: `444`

size of the upload

**`width`**

- Type: null, integer
- Example: `30`

Width of image

**`height`**

- Type: null, integer
- Example: `30`

Height of image

**`path`**

- Type: string
- Example: `"/45/1496845848-digital-cats.jpg"`

Upload path

**`basename`**

- Type: string
- Example: `"digital-cats"`

Upload basename

**`filename`**

- Type: string
- Example: `"digital-cats.jpg"`

Upload filename

**`url`**

- Type: string
- Example: `"https://www.datocms-assets.com/45/1496845848-digital-cats.jpg"`

Upload URL

**`format`**

- Type: string, null
- Example: `"jpg"`

Format

**`author`**

- Type: string, null
- Example: `"Mark Smith"`

Author

**`copyright`**

- Type: string, null
- Example: `"2020 DatoCMS"`

Copyright

**`notes`**

- Type: string, null
- Example: `"Nyan the cat"`

Notes

**`md5`**

- Type: string
- Example: `"873c296d0f2b7ee569f2d7ddaebc0d33"`

The MD5 hash of the asset

**`duration`**

- Type: integer, null
- Example: `62`

Seconds of duration for the video

**`frame_rate`**

- Type: integer, null
- Example: `30`

Frame rate (FPS) for the video

**`blurhash`**

- Type: string, null
- Example: `"LEHV6nWB2yk8pyo0adR*.7kCMdnj"`

Blurhash for the asset

**`thumbhash`**

- Type: string, null
- Example: `"UhqCDQIkrHOfVG8wBa2v39z7CXeqZWFLdg=="`

Base64 encoded ThumbHash for the asset

**`mux_playback_id`**

- Type: string, null
- Example: `"a1B2c3D4e5F6g7H8i9"`

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

**`mux_mp4_highest_res`**

- Type: enum, null
- Example: `"high"`

Maximum quality of MP4 rendition available

<details>
<summary>Show enum values</summary>

**`high`**

**`medium`**

**`low`**

</details>

**`default_field_metadata`**

- Type: object

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](https://www.datocms.com/product-updates/non-localized-focal-points) for more info.

Example:

```json
{
  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,
}
```

<details>
<summary>Show object format</summary>

**`alt`**

- Type: object
- Example: `{ en: "Alternate text" }`

Alternate text per locale

**`title`**

- Type: object
- Example: `{ en: "Title" }`

Title per locale

**`custom_data`**

- Type: object
- Example: `{ en: { add_watermark: true } }`

Object with arbitrary metadata, per locale

**`focal_point`**

- Type: object, null

Focal point (only for image assets)

<details>
<summary>Show object format</summary>

**`x`**

- Type: number
- Example: `0.5`

Horizontal position expressed as float between 0 and 1

**`y`**

- Type: number
- Example: `0.5`

Vertical position expressed as float between 0 and 1

</details>

**`poster_time`**

- Type: number, null
- Example: `12.5`

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)

</details>

**`is_image`**

- Type: boolean

Is this upload an image?

**`created_at`**

- Type: null, date-time

Date of upload

**`updated_at`**

- Type: null, date-time

Date of last update

**`mime_type`**

- Type: null, string
- Example: `"image/jpeg"`

Mime type of upload

**`tags`**

- Type: Array\<string\>
- Example: `["cats"]`

Tags

**`smart_tags`**

- Type: Array\<string\>
- Example: `["robot-cats"]`

Smart tags

**`exif_info`**

- Type: object

Exif information

Example:

```json
{
  iso: 10000,
  model: "ILCE-7",
  flash_mode: 16,
  focal_length: 35,
  exposure_time: 0.0166667,
}
```

**`colors`**

- Type: Array\<object\>

Dominant colors of the image

Example:

```json
[
  { red: 206, green: 203, blue: 167, alpha: 255 },
  { red: 158, green: 163, blue: 93, alpha: 255 },
]
```

<details>
<summary>Show objects format inside array</summary>

**`red`**

- Type: integer
- Example: `115`

Red value (from 0 to 255)

**`green`**

- Type: integer
- Example: `133`

Green value (from 0 to 255)

**`blue`**

- Type: integer
- Example: `27`

Blue value (from 0 to 255)

**`alpha`**

- Type: integer
- Example: `255`

Alpha value (from 0 to 255)

</details>

**`meta.antivirus`**

- Type: object

Antivirus scan information

<details>
<summary>Show object format</summary>

**`status`**

- Type: enum
- Example: `"clean"`

Antivirus scan status of the asset

<details>
<summary>Show enum values</summary>

**`pending`**

**`clean`**

**`infected`**

**`failed`**

**`skipped`**

</details>

**`checked_at`**

- Type: date-time, null

Date of the last antivirus scan

**`threat_name`**

- Type: string, null

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

</details>

**`creator`**

- Type: [ResourceLinkage\<"account"\>](http://localhost:8080/docs/content-management-api/resources/account.md), [ResourceLinkage\<"access_token"\>](http://localhost:8080/docs/content-management-api/resources/access_token.md), [ResourceLinkage\<"user"\>](http://localhost:8080/docs/content-management-api/resources/user.md), [ResourceLinkage\<"sso_user"\>](http://localhost:8080/docs/content-management-api/resources/sso_user.md), [ResourceLinkage\<"organization"\>](http://localhost:8080/docs/content-management-api/resources/organization.md)

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

**`upload_collection`**

- Type: [ResourceLinkage\<"upload_collection"\>](http://localhost:8080/docs/content-management-api/resources/upload_collection.md), null

Upload collection to which the asset belongs

## Available endpoints

-   [Create a new upload](https://www.datocms.com/docs/content-management-api/resources/upload/create.md)
-   [List all uploads](https://www.datocms.com/docs/content-management-api/resources/upload/instances.md)
-   [Retrieve an upload](https://www.datocms.com/docs/content-management-api/resources/upload/self.md)
-   [Delete an upload](https://www.datocms.com/docs/content-management-api/resources/upload/destroy.md)
-   [Update an upload](https://www.datocms.com/docs/content-management-api/resources/upload/update.md)
-   [Referenced records](https://www.datocms.com/docs/content-management-api/resources/upload/references.md)
-   [Add tags to assets in bulk](https://www.datocms.com/docs/content-management-api/resources/upload/bulk_tag.md)
-   [Put assets into a collection in bulk](https://www.datocms.com/docs/content-management-api/resources/upload/bulk_set_upload_collection.md)
-   [Destroy uploads](https://www.datocms.com/docs/content-management-api/resources/upload/bulk_destroy.md)

## Related content in "Content Management API"

- [Content Management API Overview](https://www.datocms.com/docs/content-management-api.md)
- [Using the JavaScript CMA client](https://www.datocms.com/docs/content-management-api/using-the-nodejs-clients.md)
- [API versioning](https://www.datocms.com/docs/content-management-api/api-versioning.md)
- [Authentication](https://www.datocms.com/docs/content-management-api/authentication.md)
- [Environments](https://www.datocms.com/docs/content-management-api/setting-the-environment.md)
- [Error codes & handling failures (CMA)](https://www.datocms.com/docs/content-management-api/errors.md)
- [Pagination](https://www.datocms.com/docs/content-management-api/pagination.md)
- [Asynchronous jobs](https://www.datocms.com/docs/content-management-api/async-jobs.md)
- [CMA Technical Limits & Rate Limits](https://www.datocms.com/docs/content-management-api/technical-limits.md)
- [Record](https://www.datocms.com/docs/content-management-api/resources/item.md)
- [Scheduled publication](https://www.datocms.com/docs/content-management-api/resources/scheduled-publication.md)
- [Scheduled unpublishing](https://www.datocms.com/docs/content-management-api/resources/scheduled-unpublishing.md)
- [Upload](https://www.datocms.com/docs/content-management-api/resources/upload.md)
- [Create a new upload](https://www.datocms.com/docs/content-management-api/resources/upload/create.md)
- [List all uploads](https://www.datocms.com/docs/content-management-api/resources/upload/instances.md)
- [Retrieve an upload](https://www.datocms.com/docs/content-management-api/resources/upload/self.md)
- [Delete an upload](https://www.datocms.com/docs/content-management-api/resources/upload/destroy.md)
- [Update an upload](https://www.datocms.com/docs/content-management-api/resources/upload/update.md)
- [Referenced records](https://www.datocms.com/docs/content-management-api/resources/upload/references.md)
- [Add tags to assets in bulk](https://www.datocms.com/docs/content-management-api/resources/upload/bulk_tag.md)
- [Put assets into a collection in bulk](https://www.datocms.com/docs/content-management-api/resources/upload/bulk_set_upload_collection.md)
- [Destroy uploads](https://www.datocms.com/docs/content-management-api/resources/upload/bulk_destroy.md)
- [Site](https://www.datocms.com/docs/content-management-api/resources/site.md)
- [Model/Block model](https://www.datocms.com/docs/content-management-api/resources/item-type.md)
- [Field](https://www.datocms.com/docs/content-management-api/resources/field.md)
- [Fieldset](https://www.datocms.com/docs/content-management-api/resources/fieldset.md)
- [Record version](https://www.datocms.com/docs/content-management-api/resources/item-version.md)
- [Upload permission](https://www.datocms.com/docs/content-management-api/resources/upload-request.md)
- [Upload track](https://www.datocms.com/docs/content-management-api/resources/upload-track.md)
- [Manual tags](https://www.datocms.com/docs/content-management-api/resources/upload-tag.md)
- [Smart tags](https://www.datocms.com/docs/content-management-api/resources/upload-smart-tag.md)
- [Upload Collection](https://www.datocms.com/docs/content-management-api/resources/upload-collection.md)
- [Search Index](https://www.datocms.com/docs/content-management-api/resources/search-index.md)
- [Search result](https://www.datocms.com/docs/content-management-api/resources/search-result.md)
- [Search indexing activity](https://www.datocms.com/docs/content-management-api/resources/search-index-event.md)
- [Environment](https://www.datocms.com/docs/content-management-api/resources/environment.md)
- [Maintenance mode](https://www.datocms.com/docs/content-management-api/resources/maintenance-mode.md)
- [Menu Item](https://www.datocms.com/docs/content-management-api/resources/menu-item.md)
- [Schema Menu Item](https://www.datocms.com/docs/content-management-api/resources/schema-menu-item.md)
- [Uploads filter](https://www.datocms.com/docs/content-management-api/resources/upload-filter.md)
- [Model filter](https://www.datocms.com/docs/content-management-api/resources/item-type-filter.md)
- [Plugin](https://www.datocms.com/docs/content-management-api/resources/plugin.md)
- [Workflow](https://www.datocms.com/docs/content-management-api/resources/workflow.md)
- [Asynchronous job](https://www.datocms.com/docs/content-management-api/resources/job.md)
- [Job result](https://www.datocms.com/docs/content-management-api/resources/job-result.md)
- [Account](https://www.datocms.com/docs/content-management-api/resources/account.md)
- [Organization](https://www.datocms.com/docs/content-management-api/resources/organization.md)
- [Invitation](https://www.datocms.com/docs/content-management-api/resources/site-invitation.md)
- [Collaborator](https://www.datocms.com/docs/content-management-api/resources/user.md)
- [Role](https://www.datocms.com/docs/content-management-api/resources/role.md)
- [API token](https://www.datocms.com/docs/content-management-api/resources/access-token.md)
- [Webhook](https://www.datocms.com/docs/content-management-api/resources/webhook.md)
- [Webhook call](https://www.datocms.com/docs/content-management-api/resources/webhook-call.md)
- [Build trigger](https://www.datocms.com/docs/content-management-api/resources/build-trigger.md)
- [Deploy activity](https://www.datocms.com/docs/content-management-api/resources/build-event.md)
- [Subscription limit](https://www.datocms.com/docs/content-management-api/resources/subscription-limit.md)
- [Subscription feature](https://www.datocms.com/docs/content-management-api/resources/subscription-feature.md)
- [SSO Settings](https://www.datocms.com/docs/content-management-api/resources/sso-settings.md)
- [SSO User](https://www.datocms.com/docs/content-management-api/resources/sso-user.md)
- [SSO Group](https://www.datocms.com/docs/content-management-api/resources/sso-group.md)
- [White-label settings](https://www.datocms.com/docs/content-management-api/resources/white-label-settings.md)
- [Audit log event](https://www.datocms.com/docs/content-management-api/resources/audit-log-event.md)