Are you recommending something like this?
https://github.com/mazira/base64-stream