Skip to Main Content

Research Guides

Using Zotero

Storing Attachments in the Cloud with ZotFile

Following is a comprehensive, step-by-step guide to transforming your Zotero installation into one that keeps its PDF and image attachments in your cloud storage, and creates links from your Zotero application and web library that don’t eat up your 300MB Zotero storage limit. The process has been tested on a Windows 10 PC with Google Drive, Dropbox, and OneDrive.

Prepare to Link Your Cloud Storage

Before you begin, you’ve installed Zotero 5 on your computer and a Zotero connector within your browser. Your cloud storage is installed as an application on your computer (not just accessible on the web)—this means that your cloud storage is visible in your computer’s directory as an external hard drive.

  1. Back up your Zotero installation. Don’t skip this step! You may not need to use this backup, but if you need it and don’t have it, you will be very sad. Go to the location of your Data Directory (by default the data storage location on Mac OS is /Users/<username>/Zotero; on Windows 10 it’s C:\Users\<User Name>\Zotero) and copy the entire Zotero folder, preferably on another drive or in the cloud. Name that copied folder something like “Zotero Backup” so that you don’t confuse it with the storage folder you’re about to create. (Note that creating a backup is a step beyond syncing your data, which won’t protect the installation.)
  2. Sign into cloud storage on your computer. Create a new folder for your attachments (these instructions will call it “Zotero”) in that storage directory.
  3. Do not yet sign into Zotero through the app, or if you’ve already been using Zotero, sign out. (This prevents Zotero from synching for the moment, which will just be confusing.)

Download and Install ZotFile

Download and install this plugin from http://zotfile.com/index.html by clicking on Download on the left side of the page (don’t try to open the file itself on your computer); then start Zotero 5 and go to “Tools→Add-ons.” This opens the Add-ons Manager page. In the settings menu (the small, drop-down wheel in the top right corner), click on “Install Add-on from File” and select the downloaded .xpi file. You’ll get an ominous warning about only downloading from trusted sources; you can trust this one. You’ll also have to restart Zotero.

Configure ZotFile

  1. Set your Linked Attachment Base Directory to the folder where you want your PDFs stored -- for instance, G:\My Drive\Zotero in the case of Google Drive on a PC.  You’ll do this using Zotero’s preferences (Edit→Preferences→Advanced→Files and Folders). Now you’ll have a clear path to the attachments from whatever computer you’re working on – as long as you set the base directory to the storage folder on every computer you use.
  2. Leave your data directory where it is. It’s tempting to think, Hey, I can put the whole Zotero installation into my cloud storage! That solves everything! Unfortunately, Zotero is not constructed to handle that, and sooner or later the database that contains all your collected citations will become an ugly, unreadable mess. 
  3. You’ll also need to set that Base Directory location in the ZotFile preferences, so that ZotFile will send your attachments to the right place. In Zotero, choose Tools→ZotFile Preferences, and set Location of Files to the same location you set the Linked Attachment Base Directory. To link new or updated files to your existing citations,  set the Source folder to your Downloads folder (or wherever you have your browser set to download files). This tells ZotFile where to look when you right-click on a citation and choose "Add attachment from source folder." ZotFile will automatically attach the most recently modified file.
  4. Sign into your Zotero account in the desktop app. Now test your installation: Add a PDF to your library from a library database. (Click the Zotero connector in your web browser while looking at the PDF.) ZotFile renames the file using metadata from the selected item (the default convention is Author_Year_Title, though you can change that). A pop-up window will show that ZotFile is renaming the PDF, and it will now appear in, and can be opened from, your Linked Attachment Base Directory.

Now you’re set to go on from here, and if you’re just starting out with Zotero, you’re done. But what about those of us—most of us—who have been using Zotero for a while, and whose links are now broken? You’ll need to move and rename your PDF files with ZotFile, and you may have to reset your paths within Zotero using Zutilo.

Move Attachments with ZotFile

Select the citations in Zotero that you want to migrate. Then right-click and choose Tools→Manage Attachments→Rename and Move.

That’s it! This puts the stored PDFs in the new, correct directory. However, though ZotFile has moved the files, Zotero may still think they’re in the old directory. Try to open one. If it opens without problem, you’re set. If you get a message that says that the PDF is missing and displays the old file path, you’ll need to update the links.

You can change the links one by one as the need arises (right-click on the item; choose Show file in the drop-down menu that appears; in the dialog box that pops up to tell you that Zotero can’t find it, click Locate and navigate to your new location). A better solution – and one that will come in handy if you ever get a new computer or new hard drive – is to use Zutilo to reassign all your file locations at once.

Optional: Re-link Files with Zutilo

If you have citations with attachments in your Zotero library already, you may need to download the plugin Zutilo as well. This plugin is found at https://github.com/wshanks/Zutilo/releases (documentation for the plugin is here). Right-click on the link and choose “Save Link as…” Again, don’t open the downloaded file; use the same procedure as in step 4 except, of course, with the zutilo.xpi file. Zutilo does not require a Zotero restart.

  1. Choose Tools→Zutilo Preferences, which will open a window of Zutilo operations. Activate (click radio button in central column) Modify attachments and Show attachments.
  2. Back in Zotero, select your citations and right-click. Choose Zutilo→Modify Attachments. In the pop-up dialog box, enter the path of the old storage area (probably C:\Users\<User Name>\Zotero on a PC, or /Users/<username>/Zotero on a Mac), then, in the second pop-up dialog box, enter the path of the new storage area (i.e., G:\My Drive\Zotero).
  3. Links magically fixed!