Right now it is necessary to use our own function to convert the stream of the s3 object body to a string:
|
const imageBuffer = await streamToString(data.Body); |
There is now an AWS utility as part of the SDK to do this:
aws/aws-sdk-js-v3#1877 (comment)
Or maybe the more up-to-date way to it is this:
aws/aws-sdk-js-v3#1877 (comment)
Right now it is necessary to use our own function to convert the stream of the s3 object body to a string:
bu-protected-s3-object-lambda/src/getOrCreateObject/resizeAndSave.js
Line 42 in 905d78f
There is now an AWS utility as part of the SDK to do this:
aws/aws-sdk-js-v3#1877 (comment)
Or maybe the more up-to-date way to it is this:
aws/aws-sdk-js-v3#1877 (comment)