s3: add x-object-size header alongwith content-length header

This commit is contained in:
Abdullah Atta
2026-06-06 08:57:41 +05:00
parent 7ad70c63ee
commit bdd5017394
+2 -2
View File
@@ -183,8 +183,8 @@ namespace Notesnook.API.Controllers
try
{
var userId = this.User.GetUserId();
var size = await s3Service.GetObjectSizeAsync(userId, name);
HttpContext.Response.Headers.ContentLength = size;
var size = await s3Service.GetObjectSizeAsync(userId, name); Response.Headers.ContentLength = size;
Response.Headers["X-Object-Size"] = size.ToString();
return Ok();
}
catch (Exception ex)