kevva / download

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

Getting name of downloaded file. #203

Open EugeneLoy opened 4 years ago

EugeneLoy commented 4 years ago

Hi. I am using download to download flies like this:

await download(url, destination)

I am aware that one can specify filename by passing extra options, however, in my situation I do not know beforehand what is the name of the file should be (I have no metadata besides url, name is not always inferrable from url).

Is there a reliable way to get filename that is used by download once download has been completed?

SrBrahma commented 3 years ago

This was a problem for me too. Found https://github.com/hgouveia/node-downloader-helper and I am using it. Muuuch better and mantained.