Skip to content

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

@JaimeStill

Description

@JaimeStill

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions