Comments (5)
if you can think of a good api i'll try to tackle it. not 100% sure how multipart works yet
from busboy.
here's what i did for connect's but ideally we have a { multiple: true }
option since it's a little confusing for people to somethings have an array and sometimes have a single part if you don't opt-in https://github.com/senchalabs/connect/blob/master/lib/middleware/multipart.js#L115
from busboy.
i guess you want .fields
as an object, right? it's kind of weird because busboy has truncated booleans which i don't know how to handle (i don't know what that even means). right now i just return it as an array.
there's also other stuff. gotta handle cases where people yield between parts.
var part
while (part = yield parser.part()) {
yield save(part, 'some file.txt') // this could take too long
}
a part can be emitted between part()
s.
then people might want the fields
before any of the parts (like CSRF, you can validate before handling any streams). not sure how to handle that either except by doing field = yield parser.field()
, but then that's annoying because you gotta do while (next = (yield parser.part()) || (yield parser.field()))
and then type check.
HOORAY FOR GENERATORS.
from busboy.
actually nvm i guess it's not really a concern haha, gotta get my mind out of the non-sync gutter, the .part() stuff should be just fine
from busboy.
i think this module is going to be a pain in the ass, just like multipart always is
from busboy.
Related Issues (20)
- enter the busboy module twice,but the opations.headers is different? HOT 2
- Lost latest field while multipart form HOT 1
- the part.length is undefined and can't catch error
- PR #23 test fails due to bug in co-busboy HOT 3
- It gets stuck if parts were not piped somewhere HOT 2
- Need to read all request's datas when error happened
- it couldn't catch file stream error HOT 2
- Plans for async/await compatibility HOT 2
- No file length HOT 1
- co-busboy was unable to parse ctx using multipart/form-data in koa2 HOT 3
- how to handle the case when file is null ?
- About file size limit ?
- 可以解析xml文件么?
- fileSize limit bug HOT 20
- Payload Too Large
- hang up in node v14 HOT 1
- Not work well in node-v14.x
- Unsupported content type:multipart/mixed HOT 1
- high risk dependency
- [Bug] Getting Error while uploading file "Unexpected end of form at Multipart._final" HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from busboy.