Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Distinguish between attachments that are 'stored copy of file' and 'link to file' #184

Open
richardlm opened this issue May 3, 2022 · 6 comments
Labels
enhancement New feature or request help wanted Seeking interested developers

Comments

@richardlm
Copy link

I store my attachments in pCloud (Webdav storage) which Zotero can access and retrieve.

However, I also store some items in local storage which Zotero can only find and retrieve if I am running it on that machine.

I know that it is possible to programmatically distinguish between these two types - a Roam plug-in offered it - but not how it is achieved.

One solution would be to show the link to a stored copy as now, and a link to a file that is stored locally, and so may not be available, has the same 'link' icon that Zotero uses.

@richardlm richardlm added the enhancement New feature or request label May 3, 2022
@argenos
Copy link
Owner

argenos commented May 3, 2022

I'm not sure what the feature request is? As far as I know, the zotero:// links should be able to open your attachments regardless of where they are stored, is that not the case?

@richardlm
Copy link
Author

I don't know the technicalities, but I found this:

_File Copies and File Links
When you add files to your Zotero library by hand, you can add them either as copies, or as links.

In case you add a file as a copy, a copy of the selected file is saved in the “storage” subdirectory of the Zotero data directory. These file copies are then synced by Zotero if you have set up file syncing (see the Sync chapter).

In case you add a file as a link, Zotero stores a link to the selected file to remember its location. Linked files are not copied, and are not synced by Zotero._

( in
https://zotero-manual.github.io/adding-files/#:~:text=File%20Copies%20and%20File%20Links,-When%20you%20add&text=These%20file%20copies%20are%20then,are%20not%20synced%20by%20Zotero )

So the stored version is always available, whereas the link is to a document that probably isn't immediately accessible. I use it as a security / backup copy.

@argenos
Copy link
Owner

argenos commented May 3, 2022

Could you please show me one of your exports where the attachments are? The current implementation should not make any distinctions between remotely and locally stored, or if they are linked attachments. What happens when you click on one of those links?

@richardlm
Copy link
Author

The actions on clicking the links in the Roam plug-in and Mdnotes are the same:

  • The action on clicking the link to the stored PDF document is to open it in the Zotero PDF editor.
  • The action on clicking the link to the linked document is to open Zotero at the metadata record.

The difference is that the linked document is indicated by an icon - see this from the Roam plug-in:
Pasted image 20220503214909

I don't know how @alixlahuec identifies this for ZoteroRoam but I assume it is in the API somewhere!

Thanks for the work you're doing with Mdnotes.

@argenos
Copy link
Owner

argenos commented May 3, 2022

I'm afraid that's probably out of the scope for mdnotes and something you'd need (or I'd recommend) to tweak on your editor of choice. If that's Obsidian, I'm pretty sure you can target those links with CSS.

@argenos argenos added the help wanted Seeking interested developers label May 3, 2022
@argenos
Copy link
Owner

argenos commented May 3, 2022

Added the help wanted tag just in case someone is interested in picking this up and making a PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Seeking interested developers
Projects
None yet
Development

No branches or pull requests

2 participants