multer is writing to `ctx.req` instead of `ctx.request`
See original GitHub issueI think multer should write to ctx.request
because that is the koa request object currently it is writing to the ctx.req
which is the original node request object.
In my opinion this change would align the behaviour of this module with the koa ecosystem.
Issue Analytics
- State:
- Created 7 years ago
- Reactions:8
- Comments:9 (1 by maintainers)
Top Results From Across the Web
2.0.0 release · Issue #30 · koa-modules/multer - GitHub
If I am granted npm/GitHub access, here are my plans for 2.0.0 release: expose ctx.file, ctx.files, ctx.request.file, and ctx.request.files ...
Read more >when I try to upload images koa2 ctx.req.files = [] but ctx ...
it s true that ctx.request.files and ctx.req.files get different results. It s like the koa-multer using ctx.req.files to handle file type.
Read more >r/node - Reddit
Writing a simple POSTed text file with node.js/Koa ... writeFile((outdir + sanitized), ctx.request.body, function(err) { if(err) return ...
Read more >Get Started with Koa.js for Node Applications | Okta Developer
Koa.js is a modern server framework from the creators of Express. Learn how to get started with Koa.js by building a fun facial...
Read more >parse-request - npm
This package exports a function that accepts an Object options argument: options (Object) - a configuration object. req (Object) - an ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
on my side, those below are always
undefined
:ctx.request.files
ctx.request.file
ctx.req.file
ctx.req.files
the configuration like this:
I tried postman and html form with
enctype="multipart/form-data"
, both had saved file with hashed name but I can’t access to file infomation viactx
the version is
koa-multer@1.0.1
andkoa@2.2.0
.Weired
@fundon can be merge that pr?