Fix incorrect dispose
Some checks failed
Build and Push Image / build-and-push (push) Has been cancelled
Some checks failed
Build and Push Image / build-and-push (push) Has been cancelled
This commit is contained in:
@@ -125,9 +125,9 @@ public class ThumbnailService(IMongoDatabase db, AobaService aobaService)
|
||||
Size = new Size(300, 300)
|
||||
});
|
||||
});
|
||||
img.Value.Dispose();
|
||||
var result = new MemoryStream();
|
||||
await img.Value.SaveAsWebpAsync(result, cancellationToken);
|
||||
img.Value.Dispose();
|
||||
result.Position = 0;
|
||||
return result;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user