Skip to content

Tag: base64

ReadFile in Base64 Nodejs

I’m trying to read an image from client side encoded in base64. How to read with nodejs? My code: But, I got this error: Answer Latest and greatest way to do this: Node supports file and buffer operations with the base64 encoding: Or using the new promises API:

How to read and save attachments using node-imap

I’m using node-imap and I can’t find a straightforward code example of how to save attachments from emails fetched using node-imap to disk using fs. I’ve read the documentation a couple of times. It appears to me I should do another fetch with a reference to the specific part of a message being the attachment. I started of with the