mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2025-10-05 02:39:33 +02:00
fix(object-storage-proxy): set content-range
This commit is contained in:
parent
951414fc62
commit
6f640ccb48
1 changed files with 1 additions and 0 deletions
|
@ -110,6 +110,7 @@ function handleObjectStorageFailure (res: express.Response, err: Error) {
|
||||||
|
|
||||||
function setS3Headers (res: express.Response, s3Response: GetObjectCommandOutput) {
|
function setS3Headers (res: express.Response, s3Response: GetObjectCommandOutput) {
|
||||||
if (s3Response.$metadata.httpStatusCode === HttpStatusCode.PARTIAL_CONTENT_206) {
|
if (s3Response.$metadata.httpStatusCode === HttpStatusCode.PARTIAL_CONTENT_206) {
|
||||||
|
res.setHeader('Content-Range', s3Response.ContentRange)
|
||||||
res.status(HttpStatusCode.PARTIAL_CONTENT_206)
|
res.status(HttpStatusCode.PARTIAL_CONTENT_206)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue