Fix range requests in s3 driver

Fixes #5380
This commit is contained in:
rijkvanzanten
2021-05-24 16:13:00 -04:00
parent a1f55b0933
commit 925c3fa3fa
2 changed files with 6 additions and 1 deletions

View File

@@ -0,0 +1,5 @@
---
'@directus/drive-s3': patch
---
Fixed video streaming capabilities of s3 storage provider

View File

@@ -208,7 +208,7 @@ export class AmazonWebServicesS3Storage extends Storage {
const params: S3.GetObjectRequest = {
Key: location,
Bucket: this.$bucket,
Range: range ? `${range.start}-${range.end || ''}` : undefined,
Range: range ? `bytes=${range.start}-${range.end || ''}` : undefined,
};
return this.$driver.getObject(params).createReadStream();