feat(api): add FileCount accessor to request Context

This commit is contained in:
Julien Neuhart
2026-06-02 19:31:25 +02:00
parent c24883b8a1
commit 1498473495
2 changed files with 21 additions and 0 deletions

View File

@@ -536,6 +536,11 @@ func (ctx *Context) FormData() *FormData {
}
}
// FileCount returns the number of files received in the request.
func (ctx *Context) FileCount() int {
return len(ctx.files)
}
// OriginalFilename returns the original filename associated with a disk path.
// If no mapping exists, it falls back to [filepath.Base].
func (ctx *Context) OriginalFilename(diskPath string) string {