feat: Streaming file uploads (#14775)
authorottomated <31470743+ottomated@users.noreply.github.com>
Thu, 20 Nov 2025 22:09:34 +0000 (14:09 -0800)
committerGitHub <noreply@github.com>
Thu, 20 Nov 2025 22:09:34 +0000 (17:09 -0500)
commitd07ddcfd8bbf0978d48e0dbbbbf6cee8d0dd7c1d
tree2284c1f3adcae310e57ce659e60b69d85b9510e4
parentdfb41e1e6264e23f05f9417fdd92ba4acf3d66c3
feat: Streaming file uploads (#14775)

* start

* pass in form_dat

* serialization

* start deserializer

* finished? deserializer

* upload progress via XHR

* simplify file offsets, sort small files first

* don't cache stream

* fix scoped ids

* tests

* re-add comment

* move location & pathname back to headers

* skip test on node 18

* changeset

* polyfill file for node 18 test

* fix refreshes

* optimize file offset table

* typo

* add lazyfile tests

* avoid double-sending form keys

* remove xhr for next PR

* fix requests stalling if files aren't read

* Update new-rivers-run.md

* encode text before determining length

---------

Co-authored-by: Rich Harris <rich.harris@vercel.com>
.changeset/new-rivers-run.md [new file with mode: 0644]
packages/kit/src/runtime/app/server/remote/form.js
packages/kit/src/runtime/client/remote-functions/form.svelte.js
packages/kit/src/runtime/form-utils.js
packages/kit/src/runtime/form-utils.spec.js
packages/kit/src/runtime/server/remote.js
packages/kit/src/types/internal.d.ts
packages/kit/src/utils/http.js
packages/kit/test/apps/basics/src/routes/remote/form/file-upload/+page.svelte [new file with mode: 0644]
packages/kit/test/apps/basics/src/routes/remote/form/file-upload/form.remote.ts [new file with mode: 0644]
packages/kit/test/apps/basics/test/test.js