R
R
Roman Morozov2021-06-03 09:19:44
AJAX
Roman Morozov, 2021-06-03 09:19:44

How can I batch receive a server response in JS and immediately send it to another server?

In JS, I need to get a file from one address on the server and send it to another address. The file is more than 100MB, if you just upload it to the browser's memory, the browser will start to get stupid.

It is necessary to download a file in one stream and immediately send the received data to another address in another stream.

Is there any way to implement this in javascript?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
A
Aetae, 2021-06-03
@Q_BASIC

Without preliminary preparation of the receiving server (to send in pieces and he pecked them) - no. A threading mechanism
is being prepared now , which in theory will allow it, but it does not work anywhere yet.

R
rPman, 2021-06-03
@rPman

if both sides are controlled by you, then you can concoct your own protocol based on some websocket and send the file in pieces

D
d1ss, 2021-06-03
@d1ss

1st server: sends a JS post/get request to the second server with a link to the file.
2nd: upon receipt - the desired actions with the file + response to the first server, optionally, with the status (success or fail).
You can use api.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question