@tsed/platform-multer 8.26.0 → 8.26.1
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.
|
@@ -60,8 +60,7 @@ function mapOptions(name, maxCount) {
|
|
|
60
60
|
* @input
|
|
61
61
|
*/
|
|
62
62
|
export function MultipartFile(name, maxCount) {
|
|
63
|
-
return (
|
|
64
|
-
const [target, propertyKey, index] = args;
|
|
63
|
+
return (target, propertyKey, index) => {
|
|
65
64
|
const multiple = Metadata.getParamTypes(target, propertyKey)[index] === Array;
|
|
66
65
|
name = (typeof name === "object" ? undefined : name);
|
|
67
66
|
const expression = [name, !multiple && "0"].filter(Boolean).join(".");
|
|
@@ -71,6 +70,6 @@ export function MultipartFile(name, maxCount) {
|
|
|
71
70
|
expression,
|
|
72
71
|
useValidation: true
|
|
73
72
|
}));
|
|
74
|
-
decorators(
|
|
73
|
+
decorators(target, propertyKey, index);
|
|
75
74
|
};
|
|
76
75
|
}
|
|
@@ -23,10 +23,11 @@ export class PlatformMulterMiddleware {
|
|
|
23
23
|
return await middleware(ctx.getRequest(), ctx.getResponse());
|
|
24
24
|
}
|
|
25
25
|
catch (er) {
|
|
26
|
-
|
|
27
|
-
|
|
26
|
+
const error = er;
|
|
27
|
+
if (error.code) {
|
|
28
|
+
throw new MulterException(error);
|
|
28
29
|
}
|
|
29
|
-
throw
|
|
30
|
+
throw error;
|
|
30
31
|
}
|
|
31
32
|
}
|
|
32
33
|
}
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@tsed/platform-multer",
|
|
3
3
|
"description": "Multer adapter package for Ts.ED framework",
|
|
4
4
|
"type": "module",
|
|
5
|
-
"version": "8.26.
|
|
5
|
+
"version": "8.26.1",
|
|
6
6
|
"source": "./src/index.ts",
|
|
7
7
|
"main": "./lib/esm/index.js",
|
|
8
8
|
"module": "./lib/esm/index.js",
|
|
@@ -59,15 +59,15 @@
|
|
|
59
59
|
"homepage": "https://github.com/tsedio/tsed/tree/production/packages/platform/platform-multer",
|
|
60
60
|
"repository": "https://github.com/tsedio/tsed",
|
|
61
61
|
"devDependencies": {
|
|
62
|
-
"@tsed/barrels": "8.26.
|
|
63
|
-
"@tsed/core": "8.26.
|
|
64
|
-
"@tsed/di": "8.26.
|
|
65
|
-
"@tsed/platform-middlewares": "8.26.
|
|
66
|
-
"@tsed/platform-params": "8.26.
|
|
67
|
-
"@tsed/typescript": "8.26.
|
|
62
|
+
"@tsed/barrels": "8.26.1",
|
|
63
|
+
"@tsed/core": "8.26.1",
|
|
64
|
+
"@tsed/di": "8.26.1",
|
|
65
|
+
"@tsed/platform-middlewares": "8.26.1",
|
|
66
|
+
"@tsed/platform-params": "8.26.1",
|
|
67
|
+
"@tsed/typescript": "8.26.1",
|
|
68
68
|
"@types/multer": "^2.0.0",
|
|
69
69
|
"eslint": "9.12.0",
|
|
70
|
-
"typescript": "
|
|
70
|
+
"typescript": "6.0.2",
|
|
71
71
|
"vitest": "3.2.4"
|
|
72
72
|
},
|
|
73
73
|
"dependencies": {
|