feat(api): add file upload api, get a upload url, then upload file, max 50mb for now

This commit is contained in:
BennyKok
2024-01-16 00:49:50 +08:00
parent 478859d9b5
commit 1ced8095dc
6 changed files with 358 additions and 216 deletions
+18
View File
@@ -0,0 +1,18 @@
import type { ResponseConfig } from "@asteasolutions/zod-to-openapi";
import { z } from "@hono/zod-openapi";
export const authError = {
401: {
content: {
"text/plain": {
schema: z.string().openapi({
type: "string",
example: "Invalid or expired token",
}),
},
},
description: "Invalid or expired token",
},
} satisfies {
[statusCode: string]: ResponseConfig;
};