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
+15
View File
@@ -0,0 +1,15 @@
{
"message": "Hello from v-hono Context.file!",
"features": [
"File serving with automatic Content-Type detection",
"Security validation against path traversal",
"Caching support with ETag and Last-Modified",
"Custom headers and options",
"Error handling for missing files"
],
"example": {
"endpoint": "/file/sample.json",
"content_type": "application/json",
"cached": true
}
}