Sorry, no results found for "".
Either an URL to download, or the ID of an upload request
"/7/1455102967-image.png"
The type of track (audio or subtitles)
"subtitles"
Subtitles
Audio
A valid BCP 47 specification compliant language code
"it-IT"
The human-readable name of the track
"Italiano"
Indicates if the track provides subtitles for the Deaf or Hard-of-hearing (SDH)
Returns a resource object of type upload_track
import { buildClient } from "@datocms/cma-client-node";
async function run() { const client = buildClient({ apiToken: process.env.DATOCMS_API_TOKEN });
const uploadId = "xBe7u01029ipxBLQhYzZCJ1cke01zCkuUsgnYtH0017nNzbpv2YcsoMDmw";
const uploadTrack = await client.uploadTracks.create(uploadId, { url_or_upload_request_id: "/7/1455102967-image.png", type: "subtitles", language_code: "it-IT", });
// Check the 'Returned output' tab for the result ☝️ console.log(uploadTrack);}
run();
{ id: "xBe7u01029ipxBLQhYzZCJ1cke01zCkuUsgnYtH0017nNzbpv2YcsoMDmw", type: "subtitles", name: "Italiano", language_code: "it-IT", closed_captions: false, status: "ready", error: null, upload: { type: "upload", id: "q0VNpiNQSkG6z0lif_O1zg" },}