简体   繁体   中英

How to send multiple response for single request in nodejs?

I am learning nodejs and angular. I am sending image to the server and processing them like changing the brightness and other things using nodejs.

Currently I am sending the response after completing the process for all files. But I want to send response for the file which have processed then next response for the next processed file and continue for this multiple files.

Then how to do that in nodejs with angular?

For angular, you can use a subject. You can subscribe to the subject and whenever any file is processed, publish that file to the subject and then subscriber will make the API requests.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM