Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

338
Views
Node8.x: ¿Por qué descarga el archivo gz de forma incompleta?

Probé este script a continuación usando Node8.x.
Funcionó pero el tamaño del archivo descargado era imperfecto.
Lo intenté durante algún tiempo y cada tamaño de archivo descargado no era el mismo.
Usando Node9+ pude descargar el archivo con éxito.
¿Alguien podría explicar cuál fue la causa?

 (async () => { const path = require('path') await downloadPromise( 'http://yann.lecun.com/exdb/mnist/t10k-labels-idx1-ubyte.gz', path.join(__dirname, './', 't10k-labels-idx1-ubyte.gz')) })() function downloadPromise (url, savepath) { return new Promise((resolve, reject) => { const http = require('http') const fs = require('fs') const outfile = fs.createWriteStream(savepath) http.get(url, (res) => { res.pipe(outfile) res.on('end', () => { outfile.close() resolve() }) }) .on('error', (err) => reject(err)) }) }
about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!