kevva / download

Download and extract files
MIT License
1.28k stars 200 forks source link

It's not downloading complete file. #139

Open ravisojitra opened 7 years ago

ravisojitra commented 7 years ago

I am downloading file using node.js with VPN enabled but it's not downloading complete file. Where by visiting that link it's downloading complete file.

var http = require('http');
var fs = require('fs');
const download = require('download');

download('http://www.yifysubtitles.com/subtitle/iron-man-3-english-yify-7948.zip').pipe(fs.createWriteStream('foo.zip'));
aymather commented 5 years ago

I'm having a similar issue. I'm trying to download a pdf. When I go to the url in the browser, and when I download it from the browser (Chrome) I'm able to download the complete file. Screen Shot 2019-07-10 at 10 32 03 AM However, when I download it using this package I don't get the textboxes filled out for some reason... Screen Shot 2019-07-10 at 10 33 04 AM

The code I'm using to download the pdf... ` const download = require('download');

var url = 'https://planning.wandsworth.gov.uk/WAM/doc/CIL%20Form-5169588.pdf?extension=.pdf&id=5169588&location=VOLUME10&contentType=application/pdf&pageCount=1%27';

download(url, ('dir')); `