mganss / AttachFromClipboard

Create message attachments from the clipboard in Thunderbird
MIT License
6 stars 2 forks source link

Attaching multiple files does not work #1

Open davoper opened 6 years ago

davoper commented 6 years ago

Select multiple files (e.g. two) in Windows Explorer, copy them to clipboard buffer. Open new message, select File -> Attach -> From Clipboard Expected behavior: both files are added to message as attachments. Actual behavior: only one file is added as attachment.

mganss commented 6 years ago

AFAIK the Windows clipboard holds only one item at a time. Copying multiple files is a feature internal to Windows Explorer. Also, the Mozilla API (nsIClipboard and nsITransferable) doesn't seem to provide for multiple clipboard items.

mganss commented 5 years ago

This now works on Linux at least (see #2). Here's a discussion about how to make this work using https://github.com/Noitidart/ostypes.

rgenoud commented 2 years ago

This now works on Linux at least (see #2).

Hi, On debian 11:

Attaching multiple files only attaches one file.

$ xclip -o -t TARGETS -selection clipboard
TIMESTAMP
TARGETS
MULTIPLE
text/uri-list
x-special/gnome-copied-files
UTF8_STRING
$ xclip -o -t text/uri-list -selection clipboard
file:///home/richard/2021-12-24-090944_580x191_scrot.png
file:///home/richard/2022-02-16-145407_1680x1050_scrot.png
file:///home/richard/playlist.m3u

I wonder why it's working on Ubuntu but not on debian...

mganss commented 2 years ago

Do you see any suspicious messages in the TB developer console?

nyq commented 1 week ago

I have just switched to TB from Outlook (Windows 10 as an OS). In Outlook pasting multiple files from clipboard has always worked. And Outlook has nothing in common with Windows Explorer, so if Outlook can accept multiple files, then it should be possible for TB to accept them too. Furthermore, I don't even use Windows Explorer as a file manager, I use FAR, and when I copy multiple files into clipboard in FAR and then paste into Outlook, it works just fine. So apparently Windows clipboard supports multiple files without any issue.