Zotero not finding my PDF attachments
Hello,
I am currently using Zotero 5.0.96 on Linux Ubuntu 20.04. I am also using Zotfile to move my attachments to a mounted folder that is connected to my Google Drive storage. When I use the Zotero Connector for Firefox and import an article along with its PDF file from a website, it is added just fine to Zotero. However, when I click on the article in Zotero, I get a message that it can't find my PDF file. It looks like it is looking in the Zotero storage folder in the Zotero data folder for the file, instead of acting like a linked file. It appears that when I use the Zotero connector in Firefox, it is storing the PDF as a Stored file and not Linked file. My Zotfile configuration has the Location of Files setting set to Custom and the folder is pointing to my mounted folder connected to my Google Drive storage. When the PDF attachment is imported through the browser connector, the file is moved to the folder setup for Zotfile Location of Files custom folder location. So, that is working. The file location that Zotero shows when it can't find the file does not exist. So, at least that is correct that it can't find the file. Also, I have the Zotero Linked attachment Base Directory also pointing to this mounted folder. In addition, I have configured Zotfile to allow Zotero to rename the files, instead of using its own logic. What appears to be happening is that Zotero is not storing these PDF attachments as Linked files, but seems to be storing them as Stored files, which is not what I want in order to get this to work. When I right-click on the article and go to Manage attachments and then Rename attachment. it also cannot find the file.
So, using the Zotero connector for FireFox on Linux along with Zotfile, how do I get Zotero to store the files as Linked files, so it can find my PDF's?
I am currently using Zotero 5.0.96 on Linux Ubuntu 20.04. I am also using Zotfile to move my attachments to a mounted folder that is connected to my Google Drive storage. When I use the Zotero Connector for Firefox and import an article along with its PDF file from a website, it is added just fine to Zotero. However, when I click on the article in Zotero, I get a message that it can't find my PDF file. It looks like it is looking in the Zotero storage folder in the Zotero data folder for the file, instead of acting like a linked file. It appears that when I use the Zotero connector in Firefox, it is storing the PDF as a Stored file and not Linked file. My Zotfile configuration has the Location of Files setting set to Custom and the folder is pointing to my mounted folder connected to my Google Drive storage. When the PDF attachment is imported through the browser connector, the file is moved to the folder setup for Zotfile Location of Files custom folder location. So, that is working. The file location that Zotero shows when it can't find the file does not exist. So, at least that is correct that it can't find the file. Also, I have the Zotero Linked attachment Base Directory also pointing to this mounted folder. In addition, I have configured Zotfile to allow Zotero to rename the files, instead of using its own logic. What appears to be happening is that Zotero is not storing these PDF attachments as Linked files, but seems to be storing them as Stored files, which is not what I want in order to get this to work. When I right-click on the article and go to Manage attachments and then Rename attachment. it also cannot find the file.
So, using the Zotero connector for FireFox on Linux along with Zotfile, how do I get Zotero to store the files as Linked files, so it can find my PDF's?
So, again, my questions is, how can I eliminate the extra steps of adding the file as a Linked file and then deleting the Stored file version when I use the FireFox Zotero connector to add the article and PDF to Zotero?
What happens if you drag a file to a Zotero item (so that it's stored in Zotero) and then use right-click --> Manage Attachments --> Rename attached items. Same thing, or does that actually turn the attachment into a link?
Also, how did you install Zotero?
I would agree that this is may be a bug with Zotfile. I did go to the Zotfile Github repository and looked at the issues, and it appears that someone else has had this issue with Ubuntu Linux. However, it looks like the project is dormant, as no new releases have been made for over a year, and the developer has indicated that he does not plan to work on it anytime in the near future.
As for how I installed Zotero, I downloaded the Linux installation file from the Zotero website and followed the instructions on this page: https://www.zotero.org/support/installation.
Any ideas on how to get this to work? Or am I stuck with having to create a linked file for the attachment and delete the original Stored file?
However, I'd expect permissions to affect the ability of Zotfile to move the file (which seems to work fine), not changing it to a link (which happens purely in the database).
One thing worth trying is if this is related to using a mounted folder (volume?). I haven't looked at the ZotFile code for this, but I'd assume it's expecting some sort of confirmation from the system that the file has been moved before triggering the conversion to a link. It's possible that it's not getting that back from the file system -- at least for testing, try this with a custom location set to the same volume as Zotero, see if that works. If it does, you'll still need to figure out what to do about it, but at least you have narrowed down the issue and have a possible workaround.
I will let you know what I find out.
If I have Zotfile move files to a local, unmounted, folder, then Zotfile works just fine, converting the PDF attachment to a Linked file. I can then use rclone periodically to sync the files in my local folder with Google Drive. I'm not sure if rclone has a way to do this automatically, but maybe I can create a background script that periodically syncs using rclone.
So, using rclone to mount my Google Drive Zotero folder to a local folder is causing Zotfile to not perform its conversion from Stored File to Linked File completely. I was hoping that if I mount the Google Drive Zotero folder to a local folder I would be able to autosync the files with Google Drive, but that does not seem to be working when using rclone. Now that I've figured out the issue, I am going to look further into using rclone to automatically sync, instead of needing to run a command from the Terminal.
Thank you for all your help in identifying the underlying issue here.
Cheers
After some testing, this rclone option works for me,
--vfs-cache-mode full
with all the defaults in the rclone systemd unit (https://github.com/rclone/rclone/wiki/Systemd-rclone-mount#systemd) left untouched. I'm using onedrive (business, uni provided) and Ubuntu 20.04.4
Probably an overkill, but can't spend much time testing at the moment.