I have a node.js server which takes an image parameter from a form with a file input tag. It uses new formdata(this)
to put it in the ajax request and returns a link to a dynamically generated image on the node.js server. I then have to visit that link to download the image. I want a way to do combine both of this call.
I found this thread which shows how you can send an ajax request to get an image. But it expects it in base64 encoding.
Is it possible to do ajax call to get an image while providing a formdata with an image, and have the return type gzip binary like how an image is normally returned and not base64?
Thanks
EDIT: I think I have to use this but not sure how.