v1.0.0
multi threaded file download for deno
Attributes
Includes Deno configuration
Repository
Current version released
3 years ago
Versions
Multi Download
Simple Multi threaded downloader ()
import { MultiDownloader } from "https://raw.githubusercontent.com/Aiko-Suzuki/multi-download/main/mod.ts";
const fileList = [{
url : "https://loremflickr.com/320/240/cat",
name: "cat.jpg",
},{
url : "https://loremflickr.com/320/240/dog",
name: "dog.jpg",
},{
url : "https://loremflickr.com/320/240/elephant",
name: "elephant.jpg",
},{
url : "https://loremflickr.com/320/240/giraffe",
name: "giraffe.jpg",
}
];
const downloader = new MultiDownloader(fileList, 4);
for await (const file of downloader.start()) {
Deno.mkdirSync("temp", { recursive: true });
await Deno.writeFile(`./temp/${file .name}`, new Uint8Array(file .buffer));
}