fix(techdocs): Handle images and other binaries correctly in aws/gcs publishers

Closes https://github.com/backstage/backstage/issues/3990
This commit is contained in:
Himanshu Mishra
2021-01-10 10:09:42 +01:00
parent 54faa6fa8d
commit de4c3af867
2 changed files with 2 additions and 2 deletions
@@ -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,