Answer the question
In order to leave comments, you need to log in
How to save an image on the client by url?
Hello, there is a task to parse information about machines from the json server.
For each object there is a line with the url of the image, for example https://site.com/audi.jpg.
The machines need to be stored in the client at the first start, this is easy to implement.
The task is to download an image from a remote server and save the image on the client in the images folder, for example. How to do it?
Answer the question
In order to leave comments, you need to log in
Node.js has an https implementation. A couple of handlers per request. An example is here https://nodejs.org/api/https.html#https_https_get_... in the 'data' event we write the received bytes to a file.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question