File uploads
To send files, declare the endpoint with body: 'multipart'. You still pass a plain object as data; Builder validates it and converts it to FormData.
Declaring an upload
Everything else about the endpoint works as usual: URL and query parameters, errorSchema, .safe(), and a JSON response validated by responseSchema. As everywhere, the fields are built from what you pass, not from what the schema made of it.
How values become form fields
Each key of data becomes one or more fields:
Form fields are text, but the schema does not have to be. A Navios server decodes each field with the schema's JSON Schema before it validates: z.number(), z.boolean(), objects and arrays, also of one item, can be used as they are. That needs a schema library that implements Standard JSON Schema, as Zod 4 does; Valibot does not by itself, so there describe the text. Never use z.coerce.boolean(), which turns "false" into true.
Several files under one key are an array:
If you already have a FormData instance, pass it as data and it is sent unchanged. The requestSchema then has to accept a FormData value, for example z.instanceof(FormData).
Validating files before they are sent
Because the schema runs before the request, size and type limits in it stop a bad upload without using the network. The call fails with kind request-validation.
Client-side checks are a convenience for the user. The server must enforce the same limits.
Client requirements
Your HTTP client must send a FormData body as it is and let the runtime set the Content-Type header with its boundary. @navios/http, axios and the fetch wrapper in these docs do. If you wrote your own, make sure it does not JSON.stringify a FormData body or force a JSON content type.
For file inputs and upload state in React, see Uploads and downloads in the React Query docs. Receiving the upload on a Navios server is covered in the server's File uploads guide.