Sorry, no results found for "".

Show examples in:
Javascript HTTP
Endpoint info
Available examples

Content Management API > Upload permission

Request a new upload

Body parameters

filename string Optional

The original file name

Example: "image.png"

Returns

Returns a resource object of type upload_request

Examples

import { buildClient } from "@datocms/cma-client-node";
async function run() {
const client = buildClient({ apiToken: process.env.DATOCMS_API_TOKEN });
const uploadRequest = await client.uploadRequest.create({});
// Check the 'Returned output' tab for the result ☝️
console.log(uploadRequest);
}
run();
{
id: "/7/1455102967-image.png",
url: "https://dato-images.s3-eu-west-1.amazonaws.com/7/1455102967-image.png?X-Amz-Credential=AKIAJDTXTZHHDUCKAUMA%2F20160210",
request_headers: {},
}