https://github.com/codedynasty-dev/jetbusboy
https://github.com/codedynasty-dev/jetbusboy
Last synced: 3 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/codedynasty-dev/jetbusboy
- Owner: CodeDynasty-dev
- Created: 2024-07-10T19:53:17.000Z (11 months ago)
- Default Branch: master
- Last Pushed: 2024-10-20T08:02:23.000Z (8 months ago)
- Last Synced: 2025-03-01T05:24:44.081Z (4 months ago)
- Language: TypeScript
- Size: 9.77 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
jetPath plugin for file upload using busboy and dependent on nodej
Explore JetPath APIs »
Join Community
.
Report Bug
.
Request Feature
--
## Installation
Install JetPath Right away on your project using npm or Javascript other package
managers.```
npm i jetpath --save
```#### An hello App setup
```ts
import { JetPath } from "jetpath";
import { jetbusboy } from "jetbusboy";const app = new JetPath({
port: 9000,
});
app.use(jetbusboy);
app.listen();// in your uploader.jet.js
// handler
export async function POST_upload(ctx: Context) {
const form = await ctx.app.formData(ctx);
console.log(form);
if (form.image) {
await form.image.saveTo(form.image.filename);
}
ctx.send(form);
}// body validation and definition
export const BODY_: JetSchema = {
body: {
image: { type: "file", inputType: "file" },
video: { type: "file", inputType: "file" },
textfield: { type: "string", nullable: false },
},
method: "POST",
};
```## Apache 2.0 Lincenced
Opensourced And Free.
Uiedbook is an open source, our vision is to make the web better, improving and
innovating infrastructures for a better web experience.You can [join]("https://t.me/UiedbookHQ") on telegram. Ask your questions and
contribute XD.### Contribution and License Agreement
If you contribute code to this project, you are implicitly allowing your code to
be distributed under the MIT license. You are also implicitly verifying that all
code is your original work.### Support
Your contribution(s) is a good force for change anytime you do it, you can
ensure JetPath's growth and improvement by contributing a re-occuring or fixed
donations to:https://www.buymeacoffee.com/fridaycandour
Or Click.