Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

236
Vistas
How to Split a file within byte ranges in NodeJS

I am trying to upload a large video to an API. The API made it mandatory that the video must be split into multiple files and uploaded via different URLs that were given to me in a previous initializeUploadRequest.

Now imagine I have a file mymove.mp4 and I am to split the file within this byte range : firstByte= 0 and lastByte= 4194303.

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

By "split the file", I assume your objective is to send an upload of each byte range portion of the file.

An efficient way to do that is to stream the file to the upload endpoint. You can create a readStream that will stream just a byte range using the start and end options for fs.createReadStream(filename, options).

const readStream = fs.createReadStream(filename, {
  start: firstByte,
  end: lastByte
});

Then, you would presumably use something like .pipe() to integrate this stream with your upload request. You don't show your upload code for us to offer an example of how you would integrate this into that.

about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda