Upload Worker Module
Upload a worker module. You can find more about the multipart metadata on our docs: https://developers.cloudflare.com/workers/configuration/multipart-upload-metadata/.
Security
API Token
The preferred authorization scheme for interacting with the Cloudflare API. Create a token.
Authorization: Bearer Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYYAPI Email + API Key
The previous authorization scheme for interacting with the Cloudflare API, used in conjunction with a Global API key.
X-Auth-Email: user@example.comThe previous authorization scheme for interacting with the Cloudflare API. When possible, use API tokens instead of Global API keys.
X-Auth-Key: 144c9defac04969c7bfad8efaa8ea194Accepted Permissions (at least one required)
Workers Scripts WritePath ParametersExpand Collapse
Query ParametersExpand Collapse
Body ParametersForm DataExpand Collapse
metadata: object { annotations, assets, bindings, 15 more } JSON-encoded metadata about the uploaded parts and Worker configuration.
JSON-encoded metadata about the uploaded parts and Worker configuration.
annotations: optional object { "workers/message", "workers/tag" } Annotations for the version created by this upload.
Annotations for the version created by this upload.
assets: optional object { config, jwt } Configuration for assets within a Worker.
Configuration for assets within a Worker.
config: optional object { _headers, _redirects, html_handling, 3 more } Configuration for assets within a Worker.
Configuration for assets within a Worker.
The contents of a _headers file (used to attach custom headers on asset responses).
The contents of a _redirects file (used to apply redirects or proxy paths ahead of asset serving).
html_handling: optional "auto-trailing-slash" or "force-trailing-slash" or "drop-trailing-slash" or "none"Determines the redirects and rewrites of requests for HTML content.
Determines the redirects and rewrites of requests for HTML content.
not_found_handling: optional "none" or "404-page" or "single-page-application"Determines the response when a request does not match a static asset, and there is no Worker script.
Determines the response when a request does not match a static asset, and there is no Worker script.
run_worker_first: optional array of string or booleanContains a list path rules to control routing to either the Worker or assets. Glob (*) and negative (!) rules are supported. Rules must start with either ’/’ or ’!/’. At least one non-negative rule must be provided, and negative rules have higher precedence than non-negative rules.
Contains a list path rules to control routing to either the Worker or assets. Glob (*) and negative (!) rules are supported. Rules must start with either ’/’ or ’!/’. At least one non-negative rule must be provided, and negative rules have higher precedence than non-negative rules.
bindings: optional array of object { name, type } or object { instance_name, name, type, namespace } or object { name, namespace, type } or 32 moreList of bindings attached to a Worker. You can find more about bindings on our docs: https://developers.cloudflare.com/workers/configuration/multipart-upload-metadata/#bindings.
List of bindings attached to a Worker. You can find more about bindings on our docs: https://developers.cloudflare.com/workers/configuration/multipart-upload-metadata/#bindings.
AISearch object { instance_name, name, type, namespace }
AISearchNamespace object { name, namespace, type }
DispatchNamespace object { name, namespace, type, outbound }
Inherit object { name, type, old_name, version_id }
Ratelimit object { name, namespace_id, simple, type }
R2Bucket object { bucket_name, name, type, jurisdiction }
jurisdiction: optional "eu" or "fedramp" or "fedramp-high"The jurisdiction of the R2 bucket.
The jurisdiction of the R2 bucket.
SendEmail object { name, type, allowed_destination_addresses, 2 more }
A JavaScript variable name for the binding.