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: "没有打包文件!"}) })