kevva / download

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

Allow to define destination for each get #38

Closed piranna closed 9 years ago

piranna commented 9 years ago

.dest() method define the location of all the downloads, and if you call it several times the last one wins. In that case, it would be better to download to that location only the ones defined after calling to .dest(), being by default the current dir. It's said, that internally each download store the location where it must be downloaded.

piranna commented 9 years ago

Another alternative is to add the location as a parameter of the .get() method. This could be extended by using an optionsBag so other per-download configs could be added, like strip paths or extraction.

kevva commented 9 years ago

Yeah, I used something like .get('url', 'dest') before but decided to remove it. Might add it back.

piranna commented 9 years ago

Having back that dest parameter would be great :-)

piranna commented 9 years ago

Any update on this?

kevva commented 9 years ago

Fixed by https://github.com/kevva/download/commit/1d11b913b3b845cfa2e2cb853a16454bd0165a04.

piranna commented 9 years ago

Great, thanks! :-D