Sorry, no results found for "".

Show examples in:
Javascript HTTP
Endpoint info
Available examples

Content Management API > Upload

Retrieve an upload

Returns

Returns a resource object of type upload

Examples

import { buildClient } from "@datocms/cma-client-node";
async function run() {
const client = buildClient({ apiToken: process.env.DATOCMS_API_TOKEN });
const uploadId = "q0VNpiNQSkG6z0lif_O1zg";
const upload = await client.uploads.find(uploadId);
// Check the 'Returned output' tab for the result ☝️
console.log(upload);
}
run();
{
id: "q0VNpiNQSkG6z0lif_O1zg",
size: 444,
width: 30,
height: 30,
path: "/45/1496845848-digital-cats.jpg",
basename: "digital-cats",
filename: "digital-cats.jpg",
url: "https://www.datocms-assets.com/45/1496845848-digital-cats.jpg",
format: "jpg",
author: "Mark Smith",
copyright: "2020 DatoCMS",
notes: "Nyan the cat",
md5: "873c296d0f2b7ee569f2d7ddaebc0d33",
duration: 62,
frame_rate: 30,
blurhash: "LEHV6nWB2yk8pyo0adR*.7kCMdnj",
thumbhash: "UhqCDQIkrHOfVG8wBa2v39z7CXeqZWFLdg==",
mux_playback_id: "a1B2c3D4e5F6g7H8i9",
mux_mp4_highest_res: "high",
default_field_metadata: {
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 },
},
},
is_image: true,
created_at: "2020-04-21T07:57:11.124Z",
updated_at: "2020-04-21T07:57:11.124Z",
mime_type: "image/jpeg",
tags: ["cats"],
smart_tags: ["robot-cats"],
exif_info: {
iso: 10000,
model: "ILCE-7",
flash_mode: 16,
focal_length: 35,
exposure_time: 0.0166667,
},
colors: [
{ red: 206, green: 203, blue: 167, alpha: 255 },
{ red: 158, green: 163, blue: 93, alpha: 255 },
],
creator: { type: "account", id: "312" },
upload_collection: {
type: "upload_collection",
id: "uinr2zfqQLeCo_1O0-ao-Q",
},
}