fix: Fixes the response body streaming for GetObject, implementing a chunk streamer

This commit is contained in:
niksis02
2025-01-15 23:11:04 +04:00
parent cca9fee532
commit c094086d83
4 changed files with 81 additions and 1 deletions
+10 -1
View File
@@ -589,7 +589,16 @@ func (c S3ApiController) GetActions(ctx *fiber.Ctx) error {
}
if res.Body != nil {
ctx.Response().SetBodyStream(res.Body, int(getint64(res.ContentLength)))
err := utils.StreamResponseBody(ctx, res.Body)
if err != nil {
SendResponse(ctx, nil,
&MetaOpts{
Logger: c.logger,
MetricsMng: c.mm,
Action: metrics.ActionGetObject,
BucketOwner: parsedAcl.Owner,
})
}
}
return SendResponse(ctx, nil,