优化打包下载
This commit is contained in:
@@ -14,7 +14,7 @@ module.exports = {
|
|||||||
fse.pathExists(path, (err, exists) => {
|
fse.pathExists(path, (err, exists) => {
|
||||||
console.log(`${path}=========>${exists}`)
|
console.log(`${path}=========>${exists}`)
|
||||||
if (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('压缩完成!')
|
console.log('压缩完成!')
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
response.download(zipPath)
|
response.download(zipPath)
|
||||||
|
|||||||
Reference in New Issue
Block a user