cloudflare
Version:
The official TypeScript library for the Cloudflare API
19 lines • 778 B
JavaScript
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
import { APIResource } from "../../resource.mjs";
export class DirectUpload extends APIResource {
/**
* Creates a direct upload that allows video uploads without an API key.
*/
create(params, options) {
const { account_id, 'Upload-Creator': uploadCreator, ...body } = params;
return this._client.post(`/accounts/${account_id}/stream/direct_upload`, {
body,
...options,
headers: {
...(uploadCreator != null ? { 'Upload-Creator': uploadCreator } : undefined),
...options?.headers,
},
})._thenUnwrap((obj) => obj.result);
}
}
//# sourceMappingURL=direct-upload.mjs.map