rndme / download

file downloading using client-side javascript
MIT License
2.29k stars 417 forks source link

When downloading from URL, allow custom filename #36

Open Permagate opened 8 years ago

Permagate commented 8 years ago

To download from a URL, currently I have to provide a single argument, which is the URL itself. The filename will be automatically determined from the URL. If I added the second filename argument, downloadjs will treat it like downloading blob url.

I think it should be possible to still treat it like downloading from URL, and use the second argument as filename instead of determining from the URL. Something like:

download('https://example.com/1234-5678-9012.pdf', 'mine.pdf')