/Wiki/sources/honojs__hono/2026/https-hono-dev-llms-full-txt-file-uploads-0f32d2a2e3f2-file-uploads-s0061-c0000.md
File Uploads - hono-docs
File Uploads Source evidence: /Sources/raw/honojs hono/honojs hono.md Canonical citation: https://hono.dev/llms full.txt file uploads Summary You can upload...
File Uploads
Source evidence: /Sources/raw/honojshono/honojshono.md Canonical citation: https://hono.dev/llms-full.txt#file-uploads
Summary
You can upload files using a form body: ts // client const res = await client.user.picture.$put({ form: { file: new File([fileToUpload], filename, { type: fileToUpload.type, }), }, }) ```ts // server const route = app.put( '/user/...
Content
You can upload files using a form body:
// client
const res = await client.user.picture.$put({
form: {
file: new File([fileToUpload], filename, {
type: fileToUpload.type,
}),
},
})// server
const route = app.put(
'/user/picture',
zValidator(
'form',
z.object({
file: z.instanceof(File),
})
)
// ...
)