fix: remove utf8 encoding on openstack publisher

The utf8 encoding, which was not setted for other cloud storage providers, broke all images and other binary files.
The files uploaded were unreadable except plain text files. So in a standard documentation, all images were broken

Signed-off-by: Flavien Chantelot <flavien.chantelot@ovhcloud.com>
This commit is contained in:
Flavien Chantelot
2021-06-28 11:24:28 +02:00
parent 31e4c48afc
commit 683308ecf8
2 changed files with 6 additions and 1 deletions
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/techdocs-common': patch
---
Fix openStack swift publisher encoding issue. Remove utf8 forced encoding on binary files
@@ -156,7 +156,7 @@ export class OpenStackSwiftPublish implements PublisherBase {
const uploadFile = limiter(
() =>
new Promise((res, rej) => {
const readStream = fs.createReadStream(filePath, 'utf8');
const readStream = fs.createReadStream(filePath);
const writeStream = this.storageClient.upload(params);