Feature request: Option to allow "Link to file" as a default behavior when dragging PDF into Zotero

There should be an option under Edit >> Preferences >> General >> File Handling to control the default behavior of how PDF files dragged into the Zotero are handled.

Currently when a user drags a PDF file into Zotero, a new item is created and a copy of the original PDF file is created an managed by Zotero internally in Zotero data directory. However, if a user would prefer to add the PDF file as "Link to file", they have to hold down Ctrl+Shift while dragging the PDF file into Zotero.

I think there should be a way to control the default behavior to be "Link to file" so that users don't always have to hold down Ctrl+Shift when dragging the PDF file. There may be many users, including myself, that prefer to manage all the PDF file manually instead of the PDF file getting lost in the complex internally managed Zotero data directory folder.
  • edited September 23, 2018
    1) @emilianoeheyns thanks, I tested your plugin but files are still being attached as a copy instead of a link to file. I am using Zotero v5.0.55 and v5.0.1 of your plugin.

    2) The checkbox in File Handling settings "Automatically attach associated PDFs and other files when saving items" is confusing. I thought this setting would allow "Link to file" when unchecked. I understand importing as a copy instead of a link to file has significant advantages, however giving users an option to "Link to file" by default with a warning would be a good idea.

    3) Maybe a better solution would be that when an item is created, it should store both a copy that is managed by Zotero and link to the original file. If either the original or copy get modified, then those changes are synced to both location (copy and link). Maybe this can be achieved using rsync.

    I guess for me "Link to file" is very important because it gives me control over how files are organized locally. This allows me to quickly navigate to certain papers without having to launch Zotero every time I want to read a paper I have previously read.
  • I can't comment on what should or should not be part of baseline Zotero. I haven't worked on that plugin in a long while but I think it only links files that live in the folder selected in "Linked Attachments Base Directory". No idea how that came about, but that's how it is. I think.
  • edited September 23, 2018
    Where does "Automatically attach associated PDFs and other files when saving items" live in the prefs?

    edit: never mind, found it.
  • @emilianoeheyns Its located under Edit >> Preferences >> General >> File Handling. https://www.zotero.org/support/preferences/general
  • I think ZotFile does what you want.
  • @emilianoeheyns You're correct, I must configure the "Linked Attachments Base Directory" before zotero-link-local-files plugin can silently make imports as a "Link to file".
  • Right, that's there to preserve syncability (which assumes the attachments are synced by other means such as dropbox).
  • @emilianoeheyns Thanks for all your help :)
  • @emilianoeheyns You should like your extension to this 12-year old (!) issue on the topic:
    https://www.zotero.org/trac/ticket/781

    It perfectly solved the problem for me; thanks!
Sign In or Register to comment.