]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/commitdiff
fix(object-storage-proxy): set content-range
authorkontrollanten <6680299+kontrollanten@users.noreply.github.com>
Wed, 22 Mar 2023 05:56:00 +0000 (06:56 +0100)
committerChocobozzz <chocobozzz@cpy.re>
Wed, 22 Mar 2023 06:35:36 +0000 (07:35 +0100)
server/controllers/object-storage-proxy.ts

index 6bff05f14052d9237cd35cecbe65d35114cfc5b0..c530b57f83ed8b586855c3493fb72c90f771f255 100644 (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)
   }
 }