mirror of
https://github.com/ankitects/anki.git
synced 2026-01-07 02:53:54 -05:00
feat(proto): extend AddMediaFile to accept file paths for streaming support
- Modify AddMediaFileRequest message to support both inline byte data and file path references - Use oneof construct to ensure exactly one data source is provided (backward compatible) - This enables memory-efficient streaming uploads for large media files on mobile clients - Addresses issue #608: AnkiDroid OutOfMemoryError when adding large media files
This commit is contained in:
parent
2d4de33cf3
commit
8e868559c9
1 changed files with 7 additions and 1 deletions
|
|
@ -36,7 +36,13 @@ message TrashMediaFilesRequest {
|
|||
repeated string fnames = 1;
|
||||
}
|
||||
|
||||
// AddMediaFileRequest now supports both inline byte data and file path references.
|
||||
// Using oneof ensures backward compatibility - exactly one must be provided.
|
||||
|
||||
message AddMediaFileRequest {
|
||||
string desired_name = 1;
|
||||
bytes data = 2;
|
||||
oneof data_source {
|
||||
bytes data = 2;
|
||||
string file_path = 3;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue