优化打包下载

This commit is contained in:
aixianling
2022-06-10 12:08:33 +08:00
parent bf23769076
commit f48d8924da

View File

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