diff options
Diffstat (limited to 'ext/bg/js/anki.js')
-rw-r--r-- | ext/bg/js/anki.js | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/ext/bg/js/anki.js b/ext/bg/js/anki.js index 183f37bc..bd4e46cd 100644 --- a/ext/bg/js/anki.js +++ b/ext/bg/js/anki.js @@ -58,6 +58,11 @@ class AnkiConnect { return await this.ankiInvoke('guiBrowse', {query}); } + async storeMediaFile(filename, dataBase64) { + await this.checkVersion(); + return await this.ankiInvoke('storeMediaFile', {filename, data: dataBase64}); + } + async checkVersion() { if (this.remoteVersion < this.localVersion) { this.remoteVersion = await this.ankiInvoke('version'); |