Comments (7)
@laurent22 sure v2 sounds good, at least it's not v1, haha.
Regarding the mini. Since the whole ecosystem is moving towards Web APIs and a lot has changed in the past few years, i think it's good enough. It's literally just the OG parser and a thin layer on top to have at least some compatibility with the current formidable APIs.
Still don't know if it gonna be the v4, but i don't see why not. I plan to move it to the org and start doing (or moving from here) tests on it.
from formidable.
By the way it's normal that the tests for this package don't even pass? It looks like there's not one good commit in the git history.
from formidable.
Well I'm going to assume this project is no longer maintained - releases with regressions that crash servers, no support whatsoever, all test units fail but nobody cares. I'm going to revert back to v2 and will eventually migrate to a more sane library.
from formidable.
I couldn't reproduce the issue on my end, it'd be very helpful if you can give something that can reliably reproduce it. I can abort my request and get the first error, but I haven't seen the second error.
Based off a quick Google search, it seems that other people have gotten the second error with other packages when they have some sort of filesystem issue, usually a lack of disk space. Since you said your server crashes every few days, this might be something to look into. Though, it wouldn't make sense that it only affects v3.
I'm not very familiar with the codebase, but I did notice a discrepancy in the write() method of the VolatileFile and PersistentFile classes. The PersistentFile class doesn't check if the stream was destroyed, unlike the VolatileFile class. I assume checking if the stream is closed is probably good enough?
formidable/src/VolatileFile.js
Line 57 in 1699ec6
formidable/src/PersistentFile.js
Line 56 in 1699ec6
from formidable.
@laurent22 sorry for that.
It's true it's not much maintained, and there are reasons, but we are primarily just two. I'm not currently using it but we have a several updates coming.
We are in spikes. The main reason to me is that i'm not in Nodejs much in the past years, and that they merged Busboy into Nodejs 20, so there's mostly no reasons for other external packages. Plus, serverless is everywhere. But completely agree, we'll come back.
By the way it's normal that the tests for this package don't even pass? It looks like there's not one good commit in the git history.
Yeah 😄 that's for quite some time. Something messed when we were adding and removing old "integration" tests from the very first codebase.
from formidable.
Meanwhile, you can try https://www.npmjs.com/package/formidable-mini - it's bare bone and probably the v4. It's just the parser with a thin wrapper on top,a lot more spec- and Web APIs- compliant.
The exposed API is minimal and also compatible with the current Formidable APIs - async parse
and async formData
.
from formidable.
@tunnckoCore and @tommyhtran, many thanks for getting back to me, I definitely understand how tricky it can be to maintain an open source project. For now we reverted to Formidable v2 and didn't experience any crashes anymore so I think we'll keep it safe and stay with this, especially since it already has everything we need.
The mini version seems interesting though - is that something you plan to support or more like a temporary package before v4?
from formidable.
Related Issues (20)
- TS Options Type Definition missing createDirsFromUploads HOT 1
- Attach fields to req.body and files to req.files like multer HOT 1
- [deps] Check for breaking changes in Dependabot PRs HOT 1
- @cunha-ambisis you should create a new form on each request (inside app.use) HOT 1
- Since V3 I get "formidable is not a function" - using require not import HOT 12
- Make multipart parser less dependent on NodeJS HOT 2
- form.parse's Promise never resolves in tests HOT 8
- Hexoid Error (?)
- Buffer usage HOT 2
- Files parsed by `IncomingForm().parse` are not automatically cleaned up or deleted. HOT 6
- firstValues export in index HOT 4
- Build giving the error in `cloudflare-pages` preset HOT 2
- maxFileSize not working as it should HOT 1
- TypeScript - Unable to access FormidableError on formidable.errors HOT 9
- Convert 'firstValues' helper into an option for Formidable constructor. HOT 2
- Support the contentType of multipart field. HOT 2
- VERSION_NOTES.md is misleading
- Engines missing in `package.json` and wrong version of Node.js supported listed in README
- How to wait for the result of writeHandler in a formidable file upload request? 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 formidable.