Referencing attachments inside a .mochi archive

Referencing attachments inside a .mochi archive

The export format reference documents data.edn and says an archive can contain media files, but I could not find how a card's markdown should reference an attachment shipping inside the same archive.

I worked it out empirically - ![](@media/<filename>) - and it imports correctly, so I am already shipping archives in that shape. Two questions: is that the canonical syntax, and is there a reason it is not in the reference?

Context: I build NextLang, an AI flashcard generator that exports native .mochi packages with generated audio on the cards. Happy to send a sample archive if it is useful.

That syntax works, but it is a legacy format (although will continue to be supported). The more modern syntax is ![Title](file-name.jpg), and is what an attachment created in-app will look like. That syntax is documented in the Markdown section of the docs.

The data.edn format is also legacy (likewise will continue to be supported), and exports from the app now create a data.json encoded using Transit for better performance. Otherwise the format is the same.

Nextlang looks great! Feel free to share a sample archive.

Thanks Matt. Good to know both are legacy but supported. I'll keep the current shape for now and note data.json/Transit for a future revision.

Here is a sample archive: a 20-card English→Spanish A2 deck ("Comer y moverse") generated by NextLang, with the TTS mp3s embedded and referenced from the cards: https://media.nextlang.co/samples/Comer_y_moverse.mochi

The uploader here only takes images, so a direct link instead - attached is how it looks after import. Would love to hear if anything about the archive looks off from Mochi's side.