[backend/api] Flush StreamWriter when exporting notes to drive file
This commit is contained in:
parent
9d4d4a027e
commit
d01af426db
1 changed files with 3 additions and 2 deletions
|
@ -426,9 +426,10 @@ public class BackgroundTaskQueue(int parallelism)
|
||||||
};
|
};
|
||||||
|
|
||||||
var stream = new MemoryStream();
|
var stream = new MemoryStream();
|
||||||
await using var sr = new StreamWriter(stream);
|
await using var sw = new StreamWriter(stream);
|
||||||
|
|
||||||
await sr.WriteAsync(JsonSerializer.Serialize(notes, JsonSerialization.Options));
|
await sw.WriteAsync(JsonSerializer.Serialize(notes, JsonSerialization.Options));
|
||||||
|
await sw.FlushAsync(token);
|
||||||
|
|
||||||
await driveSvc.StoreFileAsync(stream, user, request, true);
|
await driveSvc.StoreFileAsync(stream, user, request, true);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue