UNPKG

cloudflare

Version:

The official TypeScript library for the Cloudflare API

14 lines 790 B
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. import { APIResource } from "../../../../../resource.mjs"; export class AssetUpload extends APIResource { /** * Start uploading a collection of assets for use in a Worker version. To learn * more about the direct uploads of assets, see * https://developers.cloudflare.com/workers/static-assets/direct-upload/ */ create(dispatchNamespace, scriptName, params, options) { const { account_id, ...body } = params; return this._client.post(`/accounts/${account_id}/workers/dispatch/namespaces/${dispatchNamespace}/scripts/${scriptName}/assets-upload-session`, { body, ...options })._thenUnwrap((obj) => obj.result); } } //# sourceMappingURL=asset-upload.mjs.map