Open inanbayram opened 7 years ago
I just saw this and figured I might as well comment for people reading this. This is because the close event indicates that the last data has been received but it doesn't mean that the data has been piped properly to your local copy.
Using stream.once('finish'
might help you.
I'm downloading with the following code files from my ftp server but the code is downloading sporadically not the whole file. For example I have a file on the ftp server, which have the size of 35kb (ftp server) and after downloading on the local machine only 34kb(local) and there are some datas missing.
Someone have a idea, why this happens?