douzi8 / base64-img

convert img to base64, or convert base64 to img
164 stars 29 forks source link

base64Img.requestBase64 succeeds. But how can I get the string our of the request? #17

Open carpben opened 5 years ago

carpben commented 5 years ago

Using base64Img.requestBase64(url, function(...){...} returns a response with a 200 result. But it is unclear how to extract the image string out of it. Any suggestions?

const getImages = async () => {
    // const sig64 = await image2base64(benImgUrl)
    // return sig64
    return base64Img.requestBase64(benImgUrl, function(err: any, res: any, body: any) {
        console.log(res)
    })
}

image