@lsby/net-core-file-upload 0.1.11 → 0.1.12

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.
@@ -46,7 +46,8 @@ var \u7C7B\u578B\u63CF\u8FF0 = import_zod.z.object({
46
46
  truncated: import_zod.z.boolean(),
47
47
  size: import_zod.z.number(),
48
48
  md5: import_zod.z.string()
49
- }).array()
49
+ }).array(),
50
+ filePayload: import_zod.z.string().optional()
50
51
  });
51
52
  var \u6587\u4EF6\u4E0A\u4F20\u63D2\u4EF6 = class extends import_net_core.\u63D2\u4EF6 {
52
53
  constructor(opt) {
@@ -56,8 +57,16 @@ var \u6587\u4EF6\u4E0A\u4F20\u63D2\u4EF6 = class extends import_net_core.\u63D2\
56
57
  resP(null);
57
58
  })
58
59
  );
60
+ let filePayload;
61
+ if (req.body && typeof req.body === "object" && "filePayload" in req.body) {
62
+ let temp = req.body["filePayload"];
63
+ if (typeof temp === "string") {
64
+ filePayload = temp;
65
+ }
66
+ }
59
67
  return {
60
- files: Object.values(req.files)
68
+ files: Object.values(req.files),
69
+ filePayload
61
70
  };
62
71
  });
63
72
  }
@@ -30,6 +30,7 @@ declare var 类型描述: z.ZodObject<{
30
30
  size: number;
31
31
  md5: string;
32
32
  }>, "many">;
33
+ filePayload: z.ZodOptional<z.ZodString>;
33
34
  }, "strip", z.ZodTypeAny, {
34
35
  files: {
35
36
  name: string;
@@ -41,6 +42,7 @@ declare var 类型描述: z.ZodObject<{
41
42
  size: number;
42
43
  md5: string;
43
44
  }[];
45
+ filePayload?: string | undefined;
44
46
  }, {
45
47
  files: {
46
48
  name: string;
@@ -52,6 +54,7 @@ declare var 类型描述: z.ZodObject<{
52
54
  size: number;
53
55
  md5: string;
54
56
  }[];
57
+ filePayload?: string | undefined;
55
58
  }>;
56
59
  declare class 文件上传插件 extends __<typeof 类型描述> {
57
60
  constructor(opt: {
@@ -30,6 +30,7 @@ declare var 类型描述: z.ZodObject<{
30
30
  size: number;
31
31
  md5: string;
32
32
  }>, "many">;
33
+ filePayload: z.ZodOptional<z.ZodString>;
33
34
  }, "strip", z.ZodTypeAny, {
34
35
  files: {
35
36
  name: string;
@@ -41,6 +42,7 @@ declare var 类型描述: z.ZodObject<{
41
42
  size: number;
42
43
  md5: string;
43
44
  }[];
45
+ filePayload?: string | undefined;
44
46
  }, {
45
47
  files: {
46
48
  name: string;
@@ -52,6 +54,7 @@ declare var 类型描述: z.ZodObject<{
52
54
  size: number;
53
55
  md5: string;
54
56
  }[];
57
+ filePayload?: string | undefined;
55
58
  }>;
56
59
  declare class 文件上传插件 extends __<typeof 类型描述> {
57
60
  constructor(opt: {
package/dist/esm/index.js CHANGED
@@ -12,7 +12,8 @@ var \u7C7B\u578B\u63CF\u8FF0 = z.object({
12
12
  truncated: z.boolean(),
13
13
  size: z.number(),
14
14
  md5: z.string()
15
- }).array()
15
+ }).array(),
16
+ filePayload: z.string().optional()
16
17
  });
17
18
  var \u6587\u4EF6\u4E0A\u4F20\u63D2\u4EF6 = class extends \u63D2\u4EF6 {
18
19
  constructor(opt) {
@@ -22,8 +23,16 @@ var \u6587\u4EF6\u4E0A\u4F20\u63D2\u4EF6 = class extends \u63D2\u4EF6 {
22
23
  resP(null);
23
24
  })
24
25
  );
26
+ let filePayload;
27
+ if (req.body && typeof req.body === "object" && "filePayload" in req.body) {
28
+ let temp = req.body["filePayload"];
29
+ if (typeof temp === "string") {
30
+ filePayload = temp;
31
+ }
32
+ }
25
33
  return {
26
- files: Object.values(req.files)
34
+ files: Object.values(req.files),
35
+ filePayload
27
36
  };
28
37
  });
29
38
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lsby/net-core-file-upload",
3
- "version": "0.1.11",
3
+ "version": "0.1.12",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  "require": "./dist/cjs/index.cjs",