download icon indicating copy to clipboard operation
download copied to clipboard

Getting name of downloaded file.

Open EugeneLoy opened this issue 3 years ago • 1 comments

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?

EugeneLoy avatar Sep 14 '20 10:09 EugeneLoy

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

SrBrahma avatar May 06 '21 07:05 SrBrahma