DEV: Upgrade Uppy to v4 (#29397)

Key changes include:

- `@uppy/aws-s3-multipart` is now part of `@uppy/aws-s3`, and controlled with a boolean

- Some minor changes/renames to Uppy APIs

- Uppy has removed batch signing from their S3 multipart implementation. This commit implements a batching system outside of Uppy to avoid needing one-signing-request-per-part

- Reduces concurrent part uploads to 6, because S3 uses HTTP/1.1 and browsers limit concurrent connections to 6-per-host.

- Upstream drop-target implementation has changed slightly, so we now need `pointer-events: none` on the hover element
This commit is contained in:
David Taylor
2024-10-28 14:01:44 +00:00
committed by GitHub
parent 27c20eeacd
commit aa89acbda6
14 changed files with 515 additions and 1034 deletions

View File

@ -26,6 +26,7 @@ html.ios-device.keyboard-visible body #main-outlet .full-page-chat {
left: 0;
background-color: rgba(0, 0, 0, 0.75);
z-index: z("header");
pointer-events: none;
&-content {
width: max-content;
display: flex;

View File

@ -10,6 +10,7 @@
justify-content: center;
display: flex;
background: rgba(var(--always-black-rgb), 0.85);
pointer-events: none;
.uppy-is-drag-over & {
visibility: visible;

View File

@ -120,9 +120,8 @@ module("Discourse Chat | Component | chat-composer-uploads", function (hooks) {
this.appEvents.on(
`upload-mixin:chat-composer-uploader:upload-cancelled`,
(fileId) => {
assert.strictEqual(
fileId.includes("uppy-avatar/"),
true,
assert.true(
fileId.includes("chat-composer-uploader-avatar/"),
"upload was cancelled"
);
done();