sindresorhus/got

got.stream binary files from S3 undefined when promise resolves

jessejamesblack opened this issue · 0 comments

Hello, we are having an issue with getting binary files using got.stream when we resolve the promise the result is undefined. All other file types png, jpg, pdf, etc work. The version of got we are using is 11.8.2 I've also tried updgrading/downgrading and the same issue appears.

Example:

const stream = got.stream(s3presignedURL);
promises.push(fileType.fromStream(stream));

fileType is the npm package file-type and promises is a promise array that we push too.
When we resolve these promises if one of the files is a binary file the result is undefined. Is there something we are doing wrong here?