1 Commits

Author SHA1 Message Date
8b5803c085 Make media seekable
Some checks failed
Build and Push Image / build-and-push (push) Has been cancelled
2025-07-09 20:48:55 -04:00

View File

@@ -17,7 +17,7 @@ public class MediaController(AobaService aobaService, ILogger<MediaController> l
[ResponseCache(Duration = int.MaxValue)] [ResponseCache(Duration = int.MaxValue)]
public async Task<IActionResult> MediaAsync(ObjectId id, [FromServices] MongoClient client, CancellationToken cancellationToken) public async Task<IActionResult> MediaAsync(ObjectId id, [FromServices] MongoClient client, CancellationToken cancellationToken)
{ {
var file = await aobaService.GetFileStreamAsync(id, cancellationToken: cancellationToken); var file = await aobaService.GetFileStreamAsync(id, seekable: true, cancellationToken: cancellationToken);
if (file.HasError) if (file.HasError)
{ {
logger.LogError(file.Error.Exception, "Failed to load media stream"); logger.LogError(file.Error.Exception, "Failed to load media stream");