V
V
vasyok2282021-11-10 12:11:01
Node.js
vasyok228, 2021-11-10 12:11:01

How to fix ECONNRESET when downloading file from server?

Hello, I'm trying to upload a file from the server, and I get ECONNRESET. The file weighs 800mb. Sometimes it loads up to 400 mb and sometimes up to 100 mb, and I get ECONNRESET. You may need to add additional parameters, etc. Or use another method. The code itself:

const sendRequest = request.get({url: url, pool: {maxSockets: 3}})


Thank you in advance

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
Roman Mirilaczvili, 2021-11-10
@2ord

Try uploading in parts using an additional header
https://developer.mozilla.org/en-US/docs/Web/HTTP/...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question