Skip to content

Commit 37337db

Browse files
committed
docs: update all content to reflect new Workers API
1 parent 698edbd commit 37337db

File tree

4 files changed

+277
-318
lines changed

4 files changed

+277
-318
lines changed

src/content/docs/workers/configuration/multipart-upload-metadata.mdx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,11 @@ title: Multipart upload metadata
55

66
import { Type, MetaInfo } from "~/components";
77

8+
:::note
9+
10+
There is a new API for uploading Workers. See [here](/workers/platform/infrastructure-as-code#cloudflare-rest-api) for more information.
11+
:::
12+
813
If you're using the [Workers Script Upload API](/api/resources/workers/subresources/scripts/methods/update/) or [Version Upload API](/api/resources/workers/subresources/scripts/subresources/versions/methods/create/) directly, `multipart/form-data` uploads require you to specify a `metadata` part. This metadata defines the Worker's configuration in JSON format, analogue to the [wrangler.toml file](/workers/wrangler/configuration/).
914

1015
## Sample `metadata`

src/content/docs/workers/observability/logs/logpush.mdx

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -93,16 +93,6 @@ route = { pattern = "example.org/*", zone_name = "example.org" }
9393

9494
</WranglerConfig>
9595

96-
Configure via multipart script upload API:
97-
98-
```bash
99-
curl --request PUT \
100-
"https://api.cloudflare.com/client/v4/accounts/{account_id}/workers/scripts/{script_name}" \
101-
--header "Authorization: Bearer <API_TOKEN>" \
102-
--form 'metadata={"main_module": "my-worker.js", "logpush": true}' \
103-
--form '"my-worker.js"=@./my-worker.js;type=application/javascript+module'
104-
```
105-
10696
## Limits
10797

10898
The `logs` and `exceptions` fields have a combined limit of 16,384 characters before fields will start being truncated. Characters are counted in the order of all `exception.name`s, `exception.message`s, and then `log.message`s.

0 commit comments

Comments
 (0)