@nger/fk-upload 1.0.69 → 1.0.72

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.
@@ -71,6 +71,11 @@ class DownloadTask extends rabbitmq_1.Task {
71
71
  req.on('response', async (resp) => {
72
72
  const headers = resp.headers;
73
73
  total = Number(headers["content-length"]);
74
+ if (total > 1024 * 1024 * 1024) {
75
+ console.log(`file is to large`);
76
+ req.destroy();
77
+ complete();
78
+ }
74
79
  });
75
80
  if (next)
76
81
  await next();
@@ -14,6 +14,10 @@ class EffectTask extends rabbitmq_1.Task {
14
14
  async handle(injector, next) {
15
15
  const task = injector.get(rabbitmq_1.DATA);
16
16
  const complete = injector.get(rabbitmq_1.COMPLETE);
17
+ if (task.uploadUrl.startsWith('https://site')) {
18
+ complete();
19
+ return next && next();
20
+ }
17
21
  const fail = injector.get(rabbitmq_1.FAIL);
18
22
  const w7 = injector.get(w7_1.W7DataSource);
19
23
  const db = injector.get(typeorm_1.Db);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nger/fk-upload",
3
- "version": "1.0.69",
3
+ "version": "1.0.72",
4
4
  "description": "",
5
5
  "main": "dist/core.js",
6
6
  "types": "dist/core.d.ts",