Appears images uploaded using node library appear to be broken though they report the right size.
A similar issue was reported regarding using Java/PHP
let fileName: string = `public/static/${data["name"]}`;
let file: Storage.File = this.bucket.file(fileName);
var fileBuffer = Buffer.from(data["source"], 'base64');
return from(file.save(fileBuffer, { contentType: data["contentType"], public: data["isPublic"] }))
.pipe(map(() => {
return { source: `${this.publicURLPrefix}/${fileName}` }
}));
With the above code, image file is successfully upload, code converts base64 uploaded content and writes to file specified. However upon browsing to public URL the image appears corrupted/broken. Manually uploaded image works as expected.