uppy icon indicating copy to clipboard operation
uppy copied to clipboard

Completely redo `@uppy/aws-s3` inspired by existing modern, light s3 clients

Open Murderlon opened this issue 1 month ago • 0 comments

Initial checklist

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

Problem

@uppy/aws-s3 has become completely unwieldy in terms of code. It's hard to understand and maintain. This means everyone is hesitant to dive in and fix problems, while it's the uploader with the most reported problems

Solution

Start the plugin from scratch but significantly speed up the process by copying as much as possible from existing lightweight clients:

  • https://github.com/good-lly/s3mini
  • https://github.com/sentienhq/ultralight-s3

Note that both of these are built for servers, not browsers. However we can reuse the majority of the code (and tests) and simply remove all logic regarding signing/secrets and instead expose a single sign callback option to the consumer of @uppy/aws-s3 to call their own server, which would implement the signing.

For tests I think it's a great idea to spin up minio in a docker container, in which the container is automatically started/stopped with vitest callbacks similar to this.

Because of the size of this task, I recommend a stepped approach:

  1. Create a new base branch and remove all the code in@uppy/aws-s3/src
  2. Create a new PR against the base branch which introduces the s3 client with tests. Note that this would just be the client, not actually @uppy/aws-s3. If this is too big too, we can consider breaking this up into smaller PRs as well.
  3. Another PR to implement @uppy/aws-s3, which would only be a light wrapper around the S3 client for Uppy specific things.

The question remains whether we can do this without introducing breaking changes. Something to discuss.

Alternatives

Diving in and fixing issues instead of a refactor, but this doesn't solve the longer term issues with the plugin.

Murderlon avatar Nov 11 '25 11:11 Murderlon