Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

174
Visualizações
Don't receive whole file while streaming from different machines servers?

I have two different servers running on different machines and one server sending a .tar file to another, but I am not receiving the whole file only get one chunk of data.

Server 1 : Headers from the server I am sending the file :

File sender server headers

Server 2 : Code where I am receiving that file through API

import fs from "fs";
 this.post("/webhook",
 async (req, res) => {
   req.pipe(fs.createWriteStream(`./default.tar.gz`));
   req.on("end", () => {
     // have to update in db that file has been saved
   });
})

Problem: If I run both servers on different machine stream doesn't work and only send one chunk of data however if I run both servers on the same machine it works perfectly fine.

about 4 years ago · Juan Pablo Isaza
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda