Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

multipart/app.js - files is accessed directly from ctx.request as opposed to ctx.request.body #124

Open
JaimeStill opened this issue Aug 16, 2018 · 2 comments

Comments

@JaimeStill
Copy link

I know the version of koa used in the examples differs from the version I'm using following along with the examples (2.2.0 vs. 2.5.2), but wanted to raise a fundamental difference in the ctx object for extracting files from the request:

app.js in the examples has the following:

const files = ctx.request.body.files || {};

In version 2.5.2, this has to be set as follows:

const files = ctx.request.files || {};

Pretty sure it's a difference between versions, but figured I'd raise the issue in the event that someone else has troubles.

@JaimeStill JaimeStill changed the title multipart/app.js multipart/app.js - files is accessed directly from ctx.request as opposed to ctx.request.body Aug 16, 2018
@gustvao
Copy link

gustvao commented Mar 31, 2020

@JaimeStill thank you!
Koa Team, pls update DOCS

@niftylettuce
Copy link

PR welcome @gustvao

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants