fix(object-storage-proxy): set content-range

This commit is contained in:
kontrollanten 2023-03-22 06:56:00 +01:00 committed by Chocobozzz
parent 951414fc62
commit 6f640ccb48
1 changed files with 1 additions and 0 deletions

View File

@ -110,6 +110,7 @@ function handleObjectStorageFailure (res: express.Response, err: Error) {
function setS3Headers (res: express.Response, s3Response: GetObjectCommandOutput) {
if (s3Response.$metadata.httpStatusCode === HttpStatusCode.PARTIAL_CONTENT_206) {
res.setHeader('Content-Range', s3Response.ContentRange)
res.status(HttpStatusCode.PARTIAL_CONTENT_206)
}
}