The idea is really simple: user performs some request, server receives it, generates several images and should somehow return those images to user, so he can see them. As soon as node.js provides a response, the images get deleted, so I cannot dynamically create URLs of images. If I'd return just one image, that's trivial. Now, I don't know how many images will be generated (based on the user imput). I can't, therefore, foreach the result and provide responses, there's only one response for one request.My options are as follows:I can generate base64 from images and return json with array of imagesI could potentially return a zip of images, but then I'd have to unzip them on the client side (is that even possible?) to display each imagesCould streaming be applied here? For just one image I reckon it is possible, but an array of images...?So, how would you tackle this problem?
Submitted July 05, 2018 at 12:00PM by JavascriptFanboy
No comments:
Post a Comment