Custom exporter - linked attachments


I have a customised RIS exporter (for import into other apps such as Tinderbox). It seems to work fine, but because I've used Zotfile to move my PDFs to a separate directory, the L1 field doesn't get populated.

Within the .js file, what data structure and fields list the linked attachments? I.e. what code gives me the local file names for the linked attachments? Then I can just create a custom RIS field to put the file names into.
  • Actually it looks like the builtin RIS exporter doesn't include attachments, linked or in Zotero storage
  • edited June 17, 2021
    It does. You have to check "Export Files" in the options dialog. But it will copy the files to the output directory and use a relative path to there, not include a path to the original linked file.
  • I'm using the Quick Copy citation - is that also supposed to include the attachments?
  • Is there a way I can turn that on? Even my custom exporter doesn't seem to have access to the attachments when it's being invoked by Quick Copy?
  • edited June 17, 2021
    You can get the full path from .localPath on the attachment object (as opposed to .defaultPath, which along with .saveFile won't be populated in Quick Copy mode).
  • Perfect, that works great. (Once I *actually* used `.localPath` instead of just referencing it in the if statement and then still assigning from `.defaultPath` doh!)

    Many thanks.
Sign In or Register to comment.