Markdown link to annotation no longer work after convert linked files to stored files
After I converting linked files to Zotero stored files, clicking the markdown link that previously extracted(when pdf is in linked attachment state) will no longer jump to the annotation it points to. Is there a way to get away with this? have thousands of link like this and trying to convert all the linked attachment to stored files to leverage the ios reader....
If you're comfortable writing some code, and you have a backup of the database from before the conversion (including one of the automatic backups in the data directory), it'd be possible to get the parent item of each item key in each link from the backup database and then rewrite each link with the item key of the main attachment from the post-conversion database.
Then for each document you wanted to convert, take the plain-text doc as a string and replace each attachment key in the first map with the corresponding attachment key in the second map.
It is just I need to learn some javascript and how to query that mapping, which looks like is not terribly bad.
SELECT I1.key AS attachmentKey, I2.key AS parentKey FROM items I1 JOIN itemAttachments IA USING (itemID) JOIN items I2 ON (parentItemID=I2.itemID) WHERE I1.libraryID=1;