From 1f0bf4cf73d60b979bfec7beb710c7cf9c8b0fe4 Mon Sep 17 00:00:00 2001 From: aixianling Date: Fri, 1 Apr 2022 16:48:42 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E4=B8=8B=E8=BD=BD=E6=97=A0?= =?UTF-8?q?=E6=B3=95=E4=BD=BF=E7=94=A8=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/rest/autodeploy/download.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/rest/autodeploy/download.js b/src/rest/autodeploy/download.js index bb95834..a92afe6 100644 --- a/src/rest/autodeploy/download.js +++ b/src/rest/autodeploy/download.js @@ -2,6 +2,7 @@ const dbUtils = require("../../utils/dbUitls"); const archiver = require("archiver") const fse = require("fs-extra"); const fs = require("fs"); +const dir = require("path") module.exports = { action: "/node/autodeploy/download", method: "post", @@ -27,7 +28,9 @@ module.exports = { arc.directory(path, false) arc.finalize().then(() => { console.log('压缩完成!') - response.download(zipPath, `${info.id}.zip`) + setTimeout(() => { + response.download(zipPath) + }, 500) }) } else response.send({code: 1, err: "没有打包文件!"}) })