ruifeng_liu 3 년 전
부모
커밋
86a7e1de05
1개의 변경된 파일5개의 추가작업 그리고 1개의 파일을 삭제
  1. 5 1
      app/service/patent/patentwarning.js

+ 5 - 1
app/service/patent/patentwarning.js

@@ -75,7 +75,10 @@ class PatentwarningService extends CrudService {
     const tifPaths = filePaths.filter(f => f.includes('.tif'));
     let lastResult;
     if (tifPaths && tifPaths.length > 0) lastResult = this.toUploadTif(warningData, tifPaths);
-    if (lastResult) { await this.dirDelete(`${uncompressFilePath}${fileName}`); }
+    if (lastResult) {
+      console.log('to delete temp');
+      await this.dirDelete(`${uncompressFilePath}${fileName}`);
+    }
     return 'ok';
   }
 
@@ -120,6 +123,7 @@ class PatentwarningService extends CrudService {
       i.file_url = filePaths;
     }
     const res = await this.model.insertMany(data);
+    console.log('add finish');
     return res;
 
   }