Sync Media Files to Anki Web if modification time is newer

The card type I am developing fetches a svg file via javascript and embed it in the card. The svg file name comes from a field in the card, so I can’t embed the svg code directly. The file is named with a leading underscore (like “_scene.svg”) and stored in the collection.media folder. When I update the file though, the updates often don’t get synced to Anki Web.

I read in another thread that this was by design because it would take too much time for Anki to compare files to identify changes. One of the work-around is to logout in Preferences → Syncing, then sync and log in again. While this seems to work, for frequent updates though, it can get troublesome. I wonder if Anki could compare the file modification timestamps between the desktop and web during sync operations and update the files that are newer.

1 Like