@midwayjs/upload 3.1.4 → 3.1.7-alpha.0
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.
- package/dist/middleware.js +7 -1
- package/index.d.ts +1 -1
- package/package.json +10 -10
package/dist/middleware.js
CHANGED
|
@@ -117,7 +117,13 @@ let UploadMiddleware = class UploadMiddleware {
|
|
|
117
117
|
getUploadBoundary(request) {
|
|
118
118
|
var _a;
|
|
119
119
|
const method = (request.method || request.httpMethod || '').toUpperCase();
|
|
120
|
-
if (
|
|
120
|
+
if (method !== 'POST' &&
|
|
121
|
+
method !== 'PUT' &&
|
|
122
|
+
method !== 'DELETE' &&
|
|
123
|
+
method !== 'PATCH') {
|
|
124
|
+
return false;
|
|
125
|
+
}
|
|
126
|
+
if (!((_a = request.headers) === null || _a === void 0 ? void 0 : _a['content-type'])) {
|
|
121
127
|
return false;
|
|
122
128
|
}
|
|
123
129
|
const contentType = request.headers['content-type'];
|
package/index.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@midwayjs/upload",
|
|
3
|
-
"version": "3.1.
|
|
3
|
+
"version": "3.1.7-alpha.0",
|
|
4
4
|
"description": "Midway Component for upload",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"typings": "index.d.ts",
|
|
@@ -25,14 +25,14 @@
|
|
|
25
25
|
"raw-body": "2.5.1"
|
|
26
26
|
},
|
|
27
27
|
"devDependencies": {
|
|
28
|
-
"@midwayjs/core": "^3.1.
|
|
29
|
-
"@midwayjs/decorator": "^3.
|
|
30
|
-
"@midwayjs/express": "^3.1.
|
|
31
|
-
"@midwayjs/faas": "^3.1.
|
|
32
|
-
"@midwayjs/koa": "^3.1.
|
|
33
|
-
"@midwayjs/mock": "^3.1.
|
|
34
|
-
"@midwayjs/serverless-app": "^3.1.
|
|
35
|
-
"@midwayjs/web": "^3.1.
|
|
28
|
+
"@midwayjs/core": "^3.1.7-alpha.0",
|
|
29
|
+
"@midwayjs/decorator": "^3.1.6",
|
|
30
|
+
"@midwayjs/express": "^3.1.7-alpha.0",
|
|
31
|
+
"@midwayjs/faas": "^3.1.7-alpha.0",
|
|
32
|
+
"@midwayjs/koa": "^3.1.7-alpha.0",
|
|
33
|
+
"@midwayjs/mock": "^3.1.7-alpha.0",
|
|
34
|
+
"@midwayjs/serverless-app": "^3.1.7-alpha.0",
|
|
35
|
+
"@midwayjs/web": "^3.1.7-alpha.0"
|
|
36
36
|
},
|
|
37
|
-
"gitHead": "
|
|
37
|
+
"gitHead": "8cb6db25f7eb794d9c61aaf69a43ac6506a289b5"
|
|
38
38
|
}
|