feat: add bun-fullstack agent and update skills
This commit is contained in:
20
.agent/skills/tech-stack/elysiajs/examples/upload-file.ts
Normal file
20
.agent/skills/tech-stack/elysiajs/examples/upload-file.ts
Normal file
@@ -0,0 +1,20 @@
|
||||
import { Elysia, t } from 'elysia'
|
||||
|
||||
const app = new Elysia()
|
||||
.post('/single', ({ body: { file } }) => file, {
|
||||
body: t.Object({
|
||||
file: t.File({
|
||||
maxSize: '1m'
|
||||
})
|
||||
})
|
||||
})
|
||||
.post(
|
||||
'/multiple',
|
||||
({ body: { files } }) => files.reduce((a, b) => a + b.size, 0),
|
||||
{
|
||||
body: t.Object({
|
||||
files: t.Files()
|
||||
})
|
||||
}
|
||||
)
|
||||
.listen(3000)
|
||||
Reference in New Issue
Block a user