AnkiMobile Media Folder Access

Hey Damien, how difficult would it be to allows users to access the media folder on AnkiMobile the way they can on Desktop? I personally would greatly benefit from this ability so I can manually manage my media files on mobile (add/delete individual files/etc). Currently it seems AnkiWeb is only way to manage media aside from manually importing entire decks every time something small changes. I use a deck that has 50gb worth of media so syncing over a 0.5-1 megabit connection is just not practical as my media changes a lot daily. Could you please enable this? I would assume you already have a media folder somewhere in the hidden part of iOS, so is it just as easy as enabling it to be viewed in the Anki folder in My Files the way the backup files are viewable there?

Also, there is this bug where if I import a 50gb deck over a local http server using the import from link option then, while it successfully does so, the app will take up 100gb of space. It seems as though the file it downloads it then does not delete after the media is imported. Also, I have to set my phone to not turn off screen during the entire import time, otherwise the download will fail and since the file isn’t deleted the partial file will just keep eating up space that I can’t delete.

1 Like

File Sharing only lets you copy or delete the entire folder at a time, so I don’t think it would work I’m afraid.

Files are downloaded into a cache folder that iOS should clean out if you run very low on disk space.

To reduce the size of the export, you could potentially use some script or program to move older media files out of your media folder prior to exporting, then move them back in afterwards, meaning the .apkg only contained more recent files.

Ah gotcha. Thanks! So the cache folder will look big but it will resolve itself over time. In which case, could you possibly add a button to clear the cache manually? And I will look into modifying the .apkg file to only contain updated media since that could help with size for updates. But what about access to the iOS media folder within the files app like the desktop version and currently how anki backup files are accessible within the files app Anki folder? Is this possible?

Is there a way to create a deck/apkg that only contains media? If I import a deck with media, but the cards already exist, it won’t add the missing media.

I’ve added a note about cache clearing to the todo list.

Unlike the macOS version, it looks like it is possible to inspect the contents of folders inside the iOS Files app, though how practical that would be with tens of thousands of files, I do not know.

Have you tried exporting a colpkg instead of apkg? That should do a verbatim transfer of the media.

2 Likes

Oh dude. If you could that would be great! Direct access to the anki media folder on iOS would be great because anki itself is great at deleting unused media and whenever I want to add missing media, I could just drag and drop the media from one source directly into the anki media folder and it would give me the option to skip existing files and only add new files or to replace all files and do a direct write. So, I personally think it would actually be a HUGE boon if you could add that and would definitely be a plus.

So your goal is to just periodically add media? If so, it sounds like the media folder doesn’t need to be exposed (which would require considerable work), and some sort of “inbox” solution + a feature to move files from the inbox into the media folder would suffice?

Yeah, an inbox system would work too if that’s easier! Just some way to add media to the folder with the option to either skip or replace any existing media/conflicts. That way users can easily update media using this inbox feature and then use the current check media button to delete unused media. And for good measure perhaps also add a button to delete all media from the folder if users want to start from a clean slate. That should ostensibly cover all scenarios for media management any users might have.

I’ve added this to the todo list to think about.

1 Like

Great! Thanks!