优化打包下载

This commit is contained in:
aixianling
2022-06-10 12:05:23 +08:00
parent bc79fa48be
commit d39134a71e

View File

@@ -14,7 +14,7 @@ module.exports = {
fse.pathExists(path, (err, exists) => {
console.log(`${path}=========>${exists}`)
if (exists) {
execute(`cd ../zips`).then(() => execute(`zip -r ${info.id}.zip ${path}`)).then(() => {
execute(`ll`).then(() => execute(`cd /root/node-service/zips&&zip -r ${info.id}.zip ${path}`)).then(() => {
console.log('压缩完成!')
setTimeout(() => {
response.download(zipPath)