cloudflare
Version:
The official TypeScript library for the Cloudflare API
17 lines • 749 B
JavaScript
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
import { APIResource } from "../../../../resource.mjs";
export class Upload 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(scriptName, params, options) {
const { account_id, ...body } = params;
return this._client.post(`/accounts/${account_id}/workers/scripts/${scriptName}/assets-upload-session`, {
body,
...options,
})._thenUnwrap((obj) => obj.result);
}
}
//# sourceMappingURL=upload.mjs.map