upload_document: chunked raw-bytes path for large files #12
Labels
No labels
prio_critical
prio_low
type_bug
type_contact
type_issue
type_lead
type_question
type_story
type_task
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
lhumina_code/hero_office#12
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Symptom
upload_documentis JSON-RPC with a base64-encoded body. A 50 MB pptx becomes ~67 MB JSON, materialized fully in browser memory and again on the server. Three full copies in flight (browser → server → foundry). Gateway body-cap kicks in before WASM does.Cause
JSON-RPC envelope is wrong shape for binary blobs above ~10 MB. Was the right call for v1 (one API surface) but doesn't scale.
Proposed fix
Add a raw-bytes upload path on
hero_office_ui:hero_office_uiproxies tohero_office_server(or directly to hero_foundry) without base64. Browser picksupload_document(RPC) for files under a threshold (1-2 MB) and the raw PUT for everything else. Same code path for delete is unchanged (small payload).Acceptance
embed/office/src/service.rs::upload_filechooses RPC vs raw based on byte length.