Skip to content

Commit ba85844

Browse files
committed
Moves previous warning to Upload File Contents section, puts tip and recs under Create an Upload Session section.
1 parent 28109fd commit ba85844

File tree

1 file changed

+17
-6
lines changed
  • src/content/docs/cloudflare-for-platforms/workers-for-platforms/configuration

1 file changed

+17
-6
lines changed

src/content/docs/cloudflare-for-platforms/workers-for-platforms/configuration/static-assets.mdx

Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -57,12 +57,15 @@ Before sending any file data, you need to tell Cloudflare which files you intend
5757
- A hash (32-hex characters) representing the file contents
5858
- The file size in bytes
5959

60-
<Aside type="caution" title="About asset isolation">
61-
Cloudflare automatically de-duplicates identical asset hashes within the same
62-
account. If an asset with the same hash has already been uploaded, it may be
63-
shared across different User Workers **unless explicitly made unique**. If you
64-
require full asset isolation, prepend asset hashes with a unique identifier
65-
(for example, an account ID or Worker name).
60+
<Aside type="note" title="Asset Isolation Considerations">
61+
By default, static assets uploaded to Workers for Platforms are associated with the User Worker they are attached to. However, if multiple User Workers exist under the same account, assets with identical hashes may be shared across them.
62+
63+
If strict isolation between User Workers is required, we recommend:
64+
65+
- **Prefixing asset hashes** with an account-specific or worker-specific identifier to ensure uniqueness.
66+
- **Ensuring JWT tokens for asset uploads are only issued to trusted platform services**, and not directly exposed to end-users.
67+
- **Explicitly documenting asset-sharing expectations** for your customers if cross-project asset reuse is intended.
68+
6669
</Aside>
6770

6871
#### Example manifest (JSON)
@@ -135,6 +138,14 @@ If the response to the Upload Session API returns `buckets`, that means you have
135138

136139
Use the [Workers Assets Upload API](https://developers.cloudflare.com/api/resources/workers/subresources/assets/subresources/upload/) to transmit the raw file bytes in base64-encoded format for any missing or changed files. Once uploaded, Cloudflare will store these files so they can then be attached to a User Worker.
137140

141+
<Aside type="caution">
142+
Cloudflare automatically de-duplicates identical asset hashes within the same
143+
account. If an asset with the same hash has already been uploaded, it may be
144+
shared across different User Workers unless **explicitly made unique**. If you
145+
require full asset isolation, prepend asset hashes with a unique identifier
146+
(for example, an account ID or Worker name).
147+
</Aside>
148+
138149
#### API Request Authentication
139150

140151
Unlike most Cloudflare API calls that use an account-wide API token in the Authorization header, uploading file contents requires using the short-lived JWT token returned in the `jwt` field of the `assets-upload-session` response.

0 commit comments

Comments
 (0)