@nger/fk-upload 1.0.62 → 1.0.63

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -7,6 +7,7 @@ const fk_service_1 = require("./fk.service");
7
7
  const task_service_1 = require("./task.service");
8
8
  const typeorm_1 = require("@nger/typeorm");
9
9
  const entities_1 = require("../../entities");
10
+ const fs_1 = require("fs");
10
11
  class UploadTask extends rabbitmq_1.Task {
11
12
  constructor() {
12
13
  super(actions_1.UPLOAD_ACTION);
@@ -23,6 +24,9 @@ class UploadTask extends rabbitmq_1.Task {
23
24
  if (task.total >= 1024 * 1024 * 1024) {
24
25
  complete();
25
26
  }
27
+ if (!(0, fs_1.existsSync)(task.path)) {
28
+ complete();
29
+ }
26
30
  await fk.startUploadFile(task).then(async (res) => {
27
31
  // create effect task
28
32
  await db.manager.update(entities_1.FkDownloadTaskEntity, task.filename, { status: 2, uploadUrl: task.uploadUrl, uploadSize: task.total, uploadStatus: 1 });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nger/fk-upload",
3
- "version": "1.0.62",
3
+ "version": "1.0.63",
4
4
  "description": "",
5
5
  "main": "dist/core.js",
6
6
  "types": "dist/core.d.ts",