工程导入
This commit is contained in:
@ -227,10 +227,10 @@ function createWindow(): void {
|
||||
}
|
||||
);*/
|
||||
http.get(url, (response) => {
|
||||
let contentLength = parseInt(
|
||||
response.headers["content-length"]
|
||||
);
|
||||
let downloadedLength = 0;
|
||||
// let contentLength = parseInt(
|
||||
// response.headers["content-length"]
|
||||
// );
|
||||
// let downloadedLength = 0;
|
||||
response.pipe(fs.createWriteStream(path));
|
||||
response.on("end", () => {
|
||||
callBack("success");
|
||||
@ -239,7 +239,7 @@ function createWindow(): void {
|
||||
});
|
||||
})
|
||||
.on("error", (err) => {
|
||||
console.log("完成");
|
||||
console.log(err, "完成");
|
||||
callBack("error");
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user