Closed danielnjoo closed 7 years ago
@danielnjoo You are correct that the convert
methods output a PNG buffer, however, these methods are asynchronous and return a Promise
that is resolved with the buffer once conversion is complete.
You can use the Promise
API directly or ES2017's async
/await
syntax to get the buffer.
I hope this helps.
Thanks, totally solved my problem :)
Question more than issue: I'm trying to post a PNG to AWS S3 without writing locally, AWS accepts buffers and that's what I thought
convert
outputs. However, when I use convert and then try to PUT the resulting object into AWS, I get an error indicating that it's not a buffer?Expected params.Body to be a string, Buffer, Stream, Blob, or typed array object
Am I using
convert
wrongly?