Merge pull request #3991 from backstage/orkohunter/fix-aws-gcs-publisher-image-routing

This commit is contained in:
Himanshu Mishra
2021-01-11 14:45:38 +01:00
committed by GitHub
3 changed files with 7 additions and 2 deletions
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/techdocs-common': patch
---
Fix bug where binary files (`png`, etc.) could not load when using AWS or GCS publisher.
@@ -186,7 +186,7 @@ export class AwsS3Publish implements PublisherBase {
fileStreamChunks.push(chunk);
})
.on('end', () => {
const fileContent = Buffer.concat(fileStreamChunks).toString();
const fileContent = Buffer.concat(fileStreamChunks);
// Inject response headers
for (const [headerKey, headerValue] of Object.entries(
responseHeaders,
@@ -184,7 +184,7 @@ export class GoogleGCSPublish implements PublisherBase {
fileStreamChunks.push(chunk);
})
.on('end', () => {
const fileContent = Buffer.concat(fileStreamChunks).toString();
const fileContent = Buffer.concat(fileStreamChunks);
// Inject response headers
for (const [headerKey, headerValue] of Object.entries(
responseHeaders,