Attach every image from a multi-file Finder paste
iamnbutler opened ·
Follow-up to #91 and PR #104. That PR attaches pasted images, but a Finder copy of several files attaches only one image.
## Confirmed behavior
A standalone WKWebView probe was given a real Finder copy of `a.png`, `b.png` and `c.txt`, all selected in Finder and copied with Cmd+C. The pasteboard held one `public.file-url` item per file, but the page's paste event saw only:
``` types: ["Files"], files: ["a.png image/png 14451"], items: ["file image/png"] ```
- WebKit exposes only the first copied file to `clipboardData.files`/`items` and hides the file-name text. - The Ace-dev build from PR #104 attached one image for a single file-URL paste, as expected. - #104 passes every exposed image file to `useAttachments().add` in one call, so in-memory image clipboards with several images aren't affected. Only multi-file Finder copies lose files.
## Expected
Pasting several images copied in Finder attaches all of them, as dropping them does. This probably needs the desktop shell to read the pasteboard's file URLs natively and hand the image files to the composer. The web clipboard event can't see them.
Related: #26 (non-image uploads). Part of #5.
iamnbutlerparent-issue-addedlast month on GitHub
iamnbutlerreferenced this in Attach images pasted into the composer #91last month on GitHub
iamnbutlerreferenced this in feat(ui): attach images pasted into the composer #104last month on GitHub
iamnbutlerreferenced this in [Meta] Dogfood Ace end to end #5last month on GitHub