Skip to content

Middleware resolves before ctx.requests is populated with uploaded file information #17

@marcandrews

Description

@marcandrews

I am running into a strange issue. After switching to Google Cloud, all my upload API endpoints are failing. The file is being uploaded successfully to my temporary directory, but it seems that the middleware is resolving before ctx.requests is populated with the information about the file. This might only occur on highly spec'ed servers.

From this koa issue and comment, it was recommended that instead of .then(next), you resolve(next()). I didn't have time to try this out myself so I just switched to another upload-handling middleware, but this may be something that might be helpful.

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