Skip to content

Companion middleware: Express v5 Support #6157

@mogzol

Description

@mogzol

Initial checklist

  • I understand this is a feature request and questions should be posted in the Community Forum
  • I searched issues and couldn’t find anything (or linked relevant results below)

Problem

Currently it doesn't look like Uppy Companion supports Express v5. The dependency is hardcoded in the package.json to Express v4, and even if I try overriding it to v5, the app fails to start due to invalid routes (Express v5 changes the route matching syntax).

If I try to use the Companion middleware as is in an Express v5 app, then requests fail because the req.query parameter is undefined. It seems to get lost when the request gets passed from Express v5 to v4. Even ignoring that, it seems there are other issues with running Express v4 and v5 at the same time, like requests getting closed multiple times, or written to after they are already closed.

Solution

The Companion middleware should support Express v5.

Alternatives

The alternative is either staying on Express v4, or switching to the standalone version of Companion.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions