Skip to content

Upload every file in a multi-file drop, not just the first - #74

Open
jhalter wants to merge 1 commit into
mierau:mainfrom
jhalter:fix-multifile-drop
Open

Upload every file in a multi-file drop, not just the first#74
jhalter wants to merge 1 commit into
mierau:mainfrom
jhalter:fix-multifile-drop

Conversation

@jhalter

@jhalter jhalter commented Jul 15, 2026

Copy link
Copy Markdown
Contributor

I ran into an issue where the files pane would accept multiple files for upload, but only one of the files would actually transfer.

Here's a proposed fix.

The Files view drop handlers pulled items.first out of the provider
array and discarded the rest, so dropping N files from Finder uploaded
exactly one. The handler still returned true, so the drop animated as
accepted and the remaining files vanished silently.

Loop over every provider instead. The three call sites that have
FileActions share a new upload(droppedItems:to:) helper; FolderItemView
has its own upload path and loops inline.

Also fixes the security-scoped resource lifetime in the same handlers:
access was released by a defer that fired as soon as the upload was
enqueued, while the transfer was still in flight. It now releases from
the upload's completion instead.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant