Skip to content

docs(examples): expand file upload example#843

Merged
yusukebe merged 1 commit intohonojs:mainfrom
SonoTommy:docs/file-upload-example-expand
Mar 31, 2026
Merged

docs(examples): expand file upload example#843
yusukebe merged 1 commit intohonojs:mainfrom
SonoTommy:docs/file-upload-example-expand

Conversation

@SonoTommy
Copy link
Copy Markdown
Contributor

Summary

This expands the existing file upload example into a more practical guide.

Changes

  • keeps the basic c.req.parseBody() example
  • adds an example with bodyLimit() for size limits
  • adds an example for multiple file uploads with parseBody({ all: true })
  • adds a short validation note before persisting uploaded files
  • adds related links to parseBody, bodyLimit, and validation docs

I kept the page concise and documentation-focused.

Copilot AI review requested due to automatic review settings March 26, 2026 15:16
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Expands the file upload example documentation to provide more practical patterns around parsing multipart form uploads, applying request size limits, and handling multiple files.

Changes:

  • Adds a basic upload example that validates the presence of a File and returns file metadata.
  • Adds an example showing how to enforce a maximum request size using bodyLimit().
  • Adds an example for handling multiple uploads via parseBody({ all: true }), plus a short validation note and related doc links.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Copy Markdown
Member

@yusukebe yusukebe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@yusukebe
Copy link
Copy Markdown
Member

@SonoTommy This is good! Thanks.

@yusukebe yusukebe merged commit 67746ed into honojs:main Mar 31, 2026
5 of 6 checks passed
@SonoTommy
Copy link
Copy Markdown
Contributor Author

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants