feat: add hono.file method

This commit is contained in:
yangshangbo
2025-07-08 11:04:27 +08:00
parent f039f24af1
commit 50c055b607
6 changed files with 1091 additions and 64 deletions
+9 -6
View File
@@ -1,9 +1,12 @@
Hello from V-Hono static file server!
This is a test file from the ./public directory.
You can access this file directly via the root path (/).
This is a test file for v-hono Context.file functionality.
Features demonstrated:
- Text file serving
- Basic file serving
- Content-Type detection
- Path mapping from URL to file system
- Security validation
- Caching options
This file can be accessed via:
- GET /file/test.txt
- GET /file-cached/test.txt
- GET /safe-file/test.txt