Skip to content

[pull] main from enyo:main - #12

Merged
pull[bot] merged 8 commits into
AKJUS:mainfrom
enyo:main
Sep 16, 2026
Merged

pull[bot] merged 8 commits into
AKJUS:mainfrom
enyo:main

Conversation

@pull

@pull pull Bot commented Sep 16, 2026 •

Copy link
Copy Markdown

See Commits and Changes for more details.


Created by pull[bot] (v2.0.0-alpha.4)

Can you help keep this open source service alive? 💖 Please sponsor : )

enyo and others added 8 commits September 13, 2026 12:45
`cancelUpload` aborted `file.xhr`, which only ever holds the request that
started last. With `parallelChunkUploads` the other chunks kept streaming
to the server for a file the UI already showed as canceled, and if the
last chunk had finished, `file.xhr` pointed at a completed request and
the abort did nothing at all.

Each chunk already carries its own `xhr`, so walk `file.upload.chunks`
and abort the ones still uploading. Non-chunked uploads keep aborting
`file.xhr` as before.

Fixes #2366

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
`emit` iterated `this._callbacks[event]` directly, so a listener that
removed itself with `off` -- how a one-shot listener is usually written,
and what teardown code does -- spliced the array while the loop was
walking it. Everything after the removed entry shifted down past the
loop's index, and the next listener was silently skipped.

Iterate over a copy instead, the way EventEmitter does. This also means
a listener registered from inside another listener first runs on the
next emit rather than the current one.

Fixes #2367

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
`createThumbnail` only handled `FileReader`'s `load` event. A file that
had been moved, locked by another process, or was otherwise unreadable
since it was dropped fires `error` instead, so the callback was never
invoked and `_processThumbnailQueue` kept `_processingThumbnail` set
forever. No file added afterwards ever got a thumbnail, and where
`transformFile` goes through `createThumbnail` -- which it does as soon
as `resizeWidth` or `resizeHeight` is set -- the upload never started
either.

Hand the error event to the callback, which is what the `img.onerror`
path in `createThumbnailFromUrl` already did, so the file is reported
with `dictThumbnailError` and the queue carries on.

`DropzoneThumbnailCallback` now declares that: `string | Event` rather
than `string`, which is what both failure paths have always passed. The
two casts that hid it are gone, and with the real signature in place the
compiler found `displayExistingFile` emitting the error event as a
thumbnail, so a preview whose image URL failed to load ended up with
`img.src` set to "[object Event]".

Fixes #2365

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Release the thumbnail queue when a file cannot be read
Abort every in-flight chunk when a chunked upload is canceled
Snapshot the listeners emit() walks
@pull pull Bot locked and limited conversation to collaborators Sep 16, 2026
@pull pull Bot added the ⤵️ pull label Sep 16, 2026
@pull
pull Bot merged commit d845335 into AKJUS:main Sep 16, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant