Show examples in:
    Retrieve an upload

    Returns

    Returns a upload resource object.

    Examples

    Example code:
    import { buildClient } from '@datocms/cma-client-node';
    async function run() {
    const client = buildClient({ apiToken: '<YOUR_API_TOKEN>' });
    const uploadId = '666';
    const upload = await client.uploads.find(uploadId);
    console.log(upload);
    }
    run();
    Returned output:
    {
    id: '666',
    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',
    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'
    }
    }