Skip to content

Commit ff40164

Browse files
committed
Enhance serialization documentation with details on server function payloads handling
1 parent 10f3c84 commit ff40164

1 file changed

Lines changed: 14 additions & 0 deletions

File tree

src/routes/solid-start/v2/(1)advanced/(4)serialization.mdx

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,20 @@ export default defineConfig({
4040

4141
If your app enforces a Content Security Policy, keep `json`.
4242

43+
## Server function payloads
44+
45+
SolidStart applies extra handling for certain payload types so file uploads and binary data can flow without being serialized by Seroval. This applies to both server function arguments and return values. SolidStart bypasses Seroval for:
46+
47+
- `FormData`
48+
- `URLSearchParams`
49+
- `Uint8Array`
50+
- `ArrayBuffer`
51+
- `Blob`
52+
- `File`
53+
- `string`
54+
55+
Because these values are transferred directly, this can yield smaller payloads for these cases.
56+
4357
## Related
4458

4559
- [Data fetching](/v2/solid-start/building-your-application/data-fetching)

0 commit comments

Comments
 (0)