A multipart body for input, streaming it where the runtime allows.
Content that is already in memory — a File, Blob, Uint8Array or string — goes into a FormData, which every
runtime handles and which lets the platform read a File off disk without loading it.
Streaming content is sent as a stream where request streaming exists (Node, Chromium over HTTP/2) and is otherwise
collected into a Blob first, because Firefox and Safari cannot send a stream at all. Collecting is the fallback
rather than the default, so nothing silently buffers a large upload on a runtime that could have streamed it.
A multipart body for
input, streaming it where the runtime allows.Content that is already in memory — a
File,Blob,Uint8Arrayor string — goes into aFormData, which every runtime handles and which lets the platform read aFileoff disk without loading it.Streaming content is sent as a stream where request streaming exists (Node, Chromium over HTTP/2) and is otherwise collected into a
Blobfirst, because Firefox and Safari cannot send a stream at all. Collecting is the fallback rather than the default, so nothing silently buffers a large upload on a runtime that could have streamed it.