How-To: Linked Attachments, Dropbox, & Zotero 4.0

NOTE: THIS HAS BEEN EDITED TO REFLECT COMMENTS BELOW. It should now give a better way of handling the question.

Here's the question:
How to use a sync'd dropbox folder as your Zotero database folder?
(instead of using Zotero's cloud file-sync, utilizing dropbox's sync)

I know there is already a thread partially related to this:
https://forums.zotero.org/discussion/28694/syncing-with-dropbox-in-zotero-40/

But there was a lot of specific trouble-shooting on that, and I felt like there should have been a simple page with ALL the "How-To" for using these features together...

Goal of Modifications:
a) Have PDFs of papers etc IN my dropbox folder (so accessible on any drop-box sync'd comp, with or without internet).
b) Have entries in Zotero that open directly to these PDFs. (so I can have all the zotero tag data, and collection abilities)
c) NOT sync via Zotero's more limited cloud-storage all my PDFs.

--------------------

The short answer "Zotfile" . http://www.jlegewie.com/zotfile.html

--------------------

Long Answer:
1) Install Zotfile (as above)
2) Set Zotfile to have a storage location on dropbox
3) Use Zotfile's "rename attachment" to actually MOVE all attachments to this folder. This should allow creation of links to pdfs in Zotero now.

To Add new Items correctly:
1) Make a new entry (download RIS citation, whatever)
2) Download PDF
3) Click on pop-up to attach and move new pdf to this.

Alternative:
1) Download pdf into Zotero (normal way)
2) Right-click on attachment, select bottom "manage attachment".
3) Rename & Move.

----------------------

An additional interesting note:
(This happened my first time, but since works as expected....)
Even though I'm using Zotero 4.0, and (thought) I'd correctly set the relative paths to the folders containing my Zot-File attachments... Zotero couldn't find them. However, fixing my folder structure on my home computer so both dropbox's were located in the same place fixed this issue.

----------------------

If anyone has suggestions on the last few steps of this process to avoid sorting all my papers into collections, I'd love that... but for others in the future... at least this will exist.
«1
  • This is very much not the recommended way to handle this and much more complicated than it needs to be:

    There are two ways to do use Zotero with Dropbox:
    1. You can place a symlink to your storage folder to dropbox:
    https://zotpad.uservoice.com/knowledgebase/articles/103395-what-is-a-symbolic-link-and-why-should-i-use-one-w

    2. You can create links to items and put those in dropbox.
    You can use the Zotfile extensions to do this automatically for both new and attached files:
    http://www.jlegewie.com/zotfile.html
    Once you've set Zotfile up to move items to a custom location automatically, you can move all existing items by selecting them and doing "Rename Attachments" from Zotfile's "Manage Attachments" menu.

    Both option 1 and 2 will also save you the need to do any of this
    My understanding of how to do this so far:
    1) Under Zotero-- Preferences:General:Miscellaneous -- set "automatically attach pdfs" to OFF
    (...)
    In future:
    3)Download PDFs to dropbox folder.
    4)Make new Zotero item from RIS feed/downloaded TAG data, then drag PDF under Zotero item (or drag, then zotero search for meta-data)
    which seems like it would make using Zotero a drag.
    (you still need to set the base directory).
  • So, I think option 2 is really what I was looking for... but that didn't show up when I was looking at another post on this...

    Let me be sure I'm clear on it all, and I'll clean up my original post so future people can find it easier...

    Zotfile will (can) automatically move recently downloaded PDFs into a different folder (you specify), and add them into the Zotero data-base as a LINK (i.e. saving space).

    So long as this different folder is on your drop-box folder, it'll stay sync'd...

    Then, if you are using the relative folder reference on Zotero, it'll always be accessible also through Zotero.

    Zotfile will also allow you to batch transfer all CURRENT attachments to this new folder, (and thus maintain collections) via it's 'rename attachment' function?
  • yes to all of this although I'm not 100% sure I understand "maintain collections" part - Zotfile will currently _not_ replicate your existing collections structure as folders for the PDFs (though you can set it up to create subfolders e.g. by author or year) but within Zotero your collections would be maintained, of course (and synced across machines). So whether that's the case depends on what you meant by that.
  • Nah, I meant my collection structure interior to zotero. If it's all organized properly there, it shouldn't be too big a hassle to drag stuff out of the folder.
  • right. plus Zotfile gives you very detailed renaming options, so stuff should be easy to find
  • Adam, please take a look at my revised original entry... I think it's fairly clear and correct now related to Zot-file... hopefully the next poor sucker trying to fix this can do it faster!
  • looks good. The only thing that puzzles me is the part about getting items in Zotero. In most cases you should do that via the URL bar icon and for most databases that would automatically attach a PDF (that Zotfile would then move to the dropbox location & link).
  • I had actually experimented some first, but I didn't check the URL bar... however, it doesn't display there...

    If you are on a journal website (say: ajp.aapt.org/resource/1/ajpias/v65/i5/p418_s1 )
    The URL link is there, but saves a snapshot with a load of junk on it.

    Alternatively, you could go directly to the pdf like these links:
    http://www.jstor.org/stable/pdfplus/27963453.pdf
    http://scitation.aip.org/getpdf/servlet/GetPDFServlet?filetype=pdf&id=AJPIAS000065000005000418000001&idtype=cvips&doi=10.1119/1.18552&prog=normal

    If you go directly to the PDF only, (basically the "print" copy).. no URL bar link. Instead, you download the PDF directly. thereby only getting the PDF. You can download directly to Zotero (making a correct entry if the meta-data is available)... or you can make a correctly tagged entry then attach the PDF...
  • if you go to a JSTOR article page, e.g.
    http://www.jstor.org/stable/10.2307/2082514 and click the URL bar, that should attach the PDF. Same for AIP, e.g.
    jpcrd.aip.org/resource/1/jpcrbu/v18/i4/p1537_s1
    AAPT isnt' currently fully supported, but you should still get one click import and can then attach the PDF.
    If the first two don't work for you start a new thread, that doesn't belong here. Generally speaking not using the URL bar icon will get you significantly poorer data.
  • edited May 7, 2013
    RESOLVED: Had to make pathways to links same, even though I was using "relative pathways" not absolute...??

    **Sigh** Follow up important question...

    When I loaded zotero on my home comp, even though the dropbox is sync'd, Zotero can no-longer find any of the references.

    I thought if I set the relative reference to the folder with attachments in, the links to PDFs should have worked.... but they don't?
  • Not exactly sure what you mean with the above post. Did you resolve the issue completely?

    The directories do not need to be the same. That would defeat the whole purpose of this feature. If you describe in more detail how you're attaching links and setting the base directory we may be able to help you figure this out.
  • Aurimas,

    I fixed it by setting them to the same path.

    I used Zot-File to rename/move all my links. Thus moving all my Zotero data to a different folder, sync'd through Dropbox. All my linked attachments show up in Zotero, but aren't linked to any file. Even when I point the relative link to the same folder I had the relative link pointed to on my work comp.

    I.E.: (stuff)/dropbox/papers/Zotero Attachments

    If the (stuff) is different, when I make my home comp's relative base directory point there, I get junk for links.

    On the other-hand, if I make the (stuff) the same, it finds all the links no problem.

    I.E. on my home comp, I have dropbox directly under my C: drive. At work, it's underneath my user docs.
  • I think it has to do with how Zotfile moves the links around and makes them... and I can't actually seem to figure out how/where the links are pointing really to see what to modify (besides just repointing them directly)
  • And now I claim complete mystery. It worked now when I moved my drop-box back out of the identical path....but put the link to the right place. **puzzled**

    Whatever. It works though.
  • ok. if it stops working, let us know before messing around with it too much. we might be able to debug this.
  • So in the basic set up with Dropbox and Zotero, what in the sync preferences screen needs to be changed (if anything)? (I have followed several threads about this, but couldn't find the information I needed.) It would be incredibly helpful to have a screen shot of what the settings should look like on that page.

    I have tried to change to my preferred target folder on DB, but it insists that there is no such server as https://www.dropbox.com/zotero/ so it won't verify it. I can't imagine why any server would end in /zotero/ from a third party service, but there doesn't seem to be any way to get rid of that part of the server name.

    If I click on a link to a specific file now I get the error message: "The attached file could not be found. It may have been deleted or moved outside of Zotero." However, if I locate the folder manually, it remembers that link.


    I have now installed Zotfile, and designated a folder in DB for attachments. Zotfile has renamed most of my attachments and by updating the Advanced Dropbox settings on my tablet, I can now access these files in ZotPad. Here is a link to an article that I found to give me the screen shots I'd been hoping for (http://www.hastac.org/blogs/annette/2012/10/20/workflow#comment-20453) So this part of the workflow is operating fine--now it's just Zotero proper that's a sticking point.

    Thanks for any help!
    NW
  • if you move&sync with ZotFile and Dropbox, you disable file sync from Zotero entirely. You just sync the data with Zotero. Dropbox does the file sync for you.
  • Thanks adamsmith. So when you say "you disable file sync from Zotero entirely," do you mean that none of the boxes should be checked on the Zotero preferences sync page?

    I've managed to set up the Zotero folders with Zotfile, and put new references in there, and renamed with links (through Zotfile) my existing refs. However, when I click on these renamed links, Zotero cannot find the files in the folder I have designated in Dropbox. When it gives me the option to locate the file, I see that it is looking in the wrong folder. This is happening both with Zotero FF and Zotero Standalone, and I've changed and restarted each of these multiple times.
  • None of the boxes under File Sync, correct.

    Where is it looking? What are your ZotFile settings in the "General" tab?
  • Thanks again(!) adamsmith, for the help. The settings read like this:

    General Settings

    Source folder for attaching new files
    Custom selected with /Users/nw/Downloads

    Location of files
    Custom location: /Users/nw/Dropbox/@Zotero_pdfs

    This is where I want them to be, but where it looks is one of two other places that at some point in the early stages of trying to set this up I designated as places.
  • If you add a new item, does that work?
    And the files are in the correct place? Did you move them by hand?
  • It works if I add them manually, or once I correct the path. It also seems to work with new pdfs of texts that I capture through the FF add-on. So the problem seems to be with older docs that had been added previously. There are a couple of hundred of these, so for obvious reasons I'm hoping not to have to do this for every file.

    By moved the files by hand, you mean, did I drag and drop them into the new folder, right? Yes I think I did, but honestly with hours into this now I can't be sure.
  • yeah, so if you moved files rather than have ZotFile do it, there's no way Zotero knows where they are, so that's to be expected. Never, ever, move a file that's linked or attached to a Zotero item.

    Thankfully you can batch change the links to files with Zutilo:
    https://addons.mozilla.org/en-us/firefox/addon/zutilo-utility-for-zotero/
  • Thanks, this looks promising and I vow never to move a file again. So I installed Zutilo, and I'm about to try using the modify attachment paths function.

    When I click on a file whose path I manually corrected it says this:
    attachments:Felski - 2011 - Suspicious Minds.pdf

    When I click on file that needs correction it says this:
    storage:Root - 2003 - Naming Nonfiction (a Polyptych).pdf

    So when it asks for

    "Old partial path to attachments' directory to be replaced" should I be typing just the "storage:" part from above and then in the replacement using the "attachments:" or do I need to get more specific about where that "attachments" can be found?

    (Since I'm using Dropbox for attachments, and have designated a folder for them that is named @Zotero_pdfs, I just don't want to be adding another layer of confusion here).
  • Update: I just tried with one file to update the path, and while it did change the path, the new one doesn't work, and when I click on the "locate" it is still looking in the old "storage folder location."
  • So, what's the full filepath for a file that needs correcting (i.e. not from Zutilo but from Finder?

    What exactly did you try when it didn't work and where do you see the changed filepath?
  • The full filepath is

    MacIntoshHD/Library/Application Support/zotero/storage

    But should be

    Users/nw/Dropbox/@Zotero_pdfs

    I tried using the update path function on Zutilo--right clicked on the particular entry and changed

    "storage:" to "attachments:" (since this was the path that Zutilo detected in FF for the files whose connections are working in FF and Standalone.)
  • what will work is:
    old filepath: storage:
    new filepath: /Users/nw/Dropbox/@Zotero_pdfs/

    Note the slashes on both sides of this. Don't forget them, this is going to be very hard to repair otherwise. Obviously try with a single file first.

    But I'm still curious how you managed to do this in the first place? Those files were in individual folders in the Zotero storage directory. How did you move them all to Dropbox? I only see three options:
    1) You did this one-by-one, in which case I'm sure you'd remember doing it for hundreds of files.
    2) You did it with ZotFile, in which case the links should have updated--if they didn't, that's a very serious bug that the developer would need to know about or
    3) You searched for all PDFs in the Zotero storage directory in Finder and then dragged them over to Dropbox.

    3) seems most likely to me, but again, it'd be very odd that you'd have done something so fairly complex and not remembered it?

    It's possible I'm overlooking an option, though.
  • I was starting to come to the same conclusion, and I will try it for a few files that are clearly in the @Zotero_pdf file (and not as proxy files from Proquest and JStor, since I recall you had pointed that out as a possible problem before).

    Now several layers into this, I think it's actually a combination of 2 and 3. I followed the Zotfile instructions and attempted to update the links that way, then when it didn't work for several of the files, I was seeing if the problem had more to do with where Zotero was looking for the attachments themselves.

    Because I was also having trouble getting ZotPad to download files (still haven't resolved this) although it can see them, I moved the data folder for zotero into DB (yes, I know--terrible idea) and then quickly reversed it. So I wonder if that might have been enough for this to get thoroughly messed up.

    OK so as soon as I can get this part sorted, I'm going to tackle the ZotPad issue--feels likely that they are related.

    Thanks again for your diligence and patience, adamsmith!
  • I can see another issue that might be part of the path problem for some of the files. I was just using Jstor and when I was downloading a pdf it asked where I wanted to put it, and I selected "download to Zotero" which points it into the attachments folder, rather than my designated folder on DB.

    Zotero on Chrome also puts it into the storage folder.
Sign In or Register to comment.