feat(pages): raise upload limits for large wasm (per-file 16 MiB, total 48 MiB)
The 5 MiB per-file cap rejected wasm binaries larger than that
("exceeds the maximum per-file size of 5242880 bytes"). Raise the
coherent limit set to fit large wasm while staying well under the
Worker's ~128 MiB memory ceiling (the body is buffered and decompressed
in memory):
- max_file: 5 -> 16 MiB
- max_uncompressed_total: 25 -> 48 MiB
- max_compressed / MAX_UPLOAD_BYTES / axum body cap: 10 -> 24 MiB
- max_entries / max_path_len / max_depth: unchanged
Updates UploadLimits::default, routes::api::MAX_UPLOAD_BYTES (the
DefaultBodyLimit layer follows it), the frontend client-side pre-check
and message, and the design doc §2.2 numbers.
Bean: pages-ufk2.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
main
parent
f42ae56bb4
commit
f7fa11071d
@ -0,0 +1,27 @@
|
|||||||
|
---
|
||||||
|
# pages-ufk2
|
||||||
|
title: 'Raise upload limits: per-file 16 MiB, total 48 MiB, body 24 MiB'
|
||||||
|
status: completed
|
||||||
|
type: task
|
||||||
|
priority: high
|
||||||
|
created_at: 2026-07-21T16:35:01Z
|
||||||
|
updated_at: 2026-07-21T16:36:48Z
|
||||||
|
---
|
||||||
|
|
||||||
|
User's wasm binary (bin_bg.wasm) exceeds the 5 MiB per-file cap ("exceeds the maximum per-file size of 5242880 bytes"). Moderate bump chosen to fit large wasm while staying well under the Worker's ~128 MiB memory ceiling (body is buffered + decompressed in memory).
|
||||||
|
|
||||||
|
New coherent limit set:
|
||||||
|
- max_file: 5 -> 16 MiB
|
||||||
|
- max_uncompressed_total: 25 -> 48 MiB
|
||||||
|
- max_compressed (== MAX_UPLOAD_BYTES / body cap): 10 -> 24 MiB
|
||||||
|
- max_entries / max_path_len / max_depth: unchanged
|
||||||
|
|
||||||
|
Spots:
|
||||||
|
- core/upload.rs UploadLimits::default() (values + doc comment)
|
||||||
|
- routes/api.rs MAX_UPLOAD_BYTES const (+ comment); DefaultBodyLimit in routes/mod.rs follows it automatically
|
||||||
|
- static/index.html client-side MAX_UPLOAD_BYTES pre-check (line ~871)
|
||||||
|
|
||||||
|
Then: validate (all six), commit, push, deploy.
|
||||||
|
|
||||||
|
## Summary of Changes
|
||||||
|
Raised default upload limits to fit large wasm: max_file 5 to 16 MiB, max_uncompressed_total 25 to 48 MiB, max_compressed / MAX_UPLOAD_BYTES / axum body cap 10 to 24 MiB (max_entries/path_len/depth unchanged). Updated UploadLimits::default, routes::api::MAX_UPLOAD_BYTES, the frontend client-side pre-check + message, and design doc §2.2 numbers. Still well under the Worker ~128 MiB memory ceiling. Validation green: 196 unit + 20 doctests.
|
||||||
Loading…
Reference in New Issue