Copy attachment files to clipboard

It would be nice if Zotero would have a new option in the item context menu: "Copy attachments to clipboard". The show file-option kind of does the same, but if you want to copy the file to clipboard for pasting e.g. to email, showing the file is an extra step in this workflow.
  • That's not really possible in a general sense.
  • Meaning operating systems don't have a way of putting files on the clipboard?
  • Right. You put data on the clipboard—text data, image data—not files. In some cases maybe you copy file paths, but the specifics depend on the OS and the applications involved.

    It's not really clear to me what mronkko means, though. E-mail has attachments and it has embedded media (such as images). You don't generally paste files themselves into e-mail.

    When it comes to the clipboard and drag and drop, which are closely linked, it basically comes down to whether you can do what you want from Firefox or Thunderbird themselves. If so, we can probably do it in Zotero. If not, we probably can't.
  • In Finder, when I select a file and press cmd+c and then move focus to an email message in Apple Mail and press cmd+v, the file is added as an attachment. I would like to do the same with Zotero and Apple Mail.
  • That's Apple-specific. (You can't do the same into Thunderbird, for example.)

    The only possible way to implement this would be with platform-specific js-ctypes. Feel free to investigate.

    We could probably get Zotero to copy text and image data, though (since, for example, you can copy an image in Firefox and paste into Mail).
  • You don't generally paste files themselves into e-mail.
    I actually do that alot. Especially re: Zotero attachments. If I want to email an attachment to someone, like mronkko says, I have to show file, then copy, then paste in Outlook since navigating to the file to attach it directly from Outlook would be fairly hideous due to the folder structure Z uses.

    I've frequently wished for this feature...like everytime I email an attachment.

    +1
  • I wasn't suggesting that navigating through the file structure is the common way, just that copy/paste is not a common—or at least universal—way of getting attachments into e-mail. Drag and drop, which all e-mail programs support, is, and Show File, drag, as you can do now, is one extra click.

    In any case, this isn't technically possible at the moment. When we drop Firefox 3.6 support in a future release, we may be able to do more with js-ctypes. (The downside is that js-ctypes are considerably more difficult to work with and require maintaining platform-specific code.)
  • Drag and drop...hmmm, that works too! For some reason that never occurred to me! :)
Sign In or Register to comment.