2

I'm using a library to upload a file and the documentation says this:

channel.sendImage( 
        fs.createReadStream('./helloworld.jpg'), 
        'hello_world1.jpg'
)

I don't have a file though, nor am I interested in creating a file, then deleting the file after this function call.

I have a base64-encoded string that I get from another 3rd-party service and I want to pass the base64-encoded string into this function.

The function sendImage takes in a NodeJS.ReadableStream.

David
  • 7,028
  • 10
  • 48
  • 95
  • 1
    can you post more information about the sendImage function? – aitchkhan Jul 04 '21 at 02:57
  • Hi. I found a couple of posts that should get you on the right track but if they don't work, let me know and I'll re-open your question – Phil Jul 04 '21 at 03:06

0 Answers0