Skip to content

Commit

Permalink
fix(object-storage-proxy): set content-range
Browse files Browse the repository at this point in the history
  • Loading branch information
kontrollanten authored and Chocobozzz committed Mar 22, 2023
1 parent 951414f commit 6f640cc
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions server/controllers/object-storage-proxy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
}

0 comments on commit 6f640cc

Please sign in to comment.