Sending large image data over HTTP in Node.js

前端 未结 3 2109
谎友^
谎友^ 2020-12-04 13:50

In my development environment I have two servers. One sends and image to the other over a POST http request.

Client server does this:

           


        
3条回答
  •  臣服心动
    2020-12-04 13:55

    I tried the solution above, and if you've just moving uploaded files or something the following works much better:

    fs.rename(path, newPath, callback(err) {});

    I was uploading files over 200MB and would encounter errors using streams, sync or async.

提交回复
热议问题