feat: init
This commit is contained in:
17
functions/routers/upload.ts
Normal file
17
functions/routers/upload.ts
Normal file
@@ -0,0 +1,17 @@
|
||||
import { Hono } from 'hono';
|
||||
|
||||
const upload = new Hono();
|
||||
|
||||
// File upload endpoint
|
||||
upload.post('/', async (c) => {
|
||||
const body = await c.req.parseBody();
|
||||
console.log(body['file'], 'File uploaded');
|
||||
|
||||
return c.json({
|
||||
success: true,
|
||||
message: 'File uploaded successfully',
|
||||
fileName: body['file']
|
||||
});
|
||||
});
|
||||
|
||||
export default upload;
|
||||
Reference in New Issue
Block a user