ankidroid / ankidroid/Anki-Android-Backend

Discuss extending `addMediaFile` to accept a file path

Open
#608 8 comments 0 reactions 0 assignees View on GitHub
Dominant language
Kotlin
Stars
91
Forks
54
Avg merge
1d 36m
Merged PRs (30d)
12

Description

The backend [`AddMediaFile`](https://github.com/ankitects/anki/blob/dac26ce67147b261d79a56092320cc2f5af0d990/proto/anki/media.proto#L15) only accepts a byte array, not a file reference

```proto
message AddMediaFileRequest {
string desired_name = 1;
bytes data = 2;
}
```

This increases memory pressure on AnkiDroid for large files, as it does not support streaming , leading to `OurOfMemoryError`.

We may wish to implement this upstream, or as an AnkiDroid-only extension to the backend

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.