Hello.At work I ran into a situation where a legacy api expected photo uploads as json with the picture as a field in the object encoded in base64.Our server had to remain efficient, and some of the images could be quite heavy. It was not practical to load images in to memory so as to be able to set the data on an object and pass that to request-promise or what have you.I found a solution on npm to stream objects as json strings but it was quite buggy. So i wrote my own version of the solution. If anyone want to have a look at it and comment that would be great.Here is the link! Hopefully it helps someone with a similar problem.Be gentle! :)
Submitted February 26, 2018 at 01:12AM by davidmdm
No comments:
Post a Comment