@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.
@@ -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 (!((_a = request.headers) === null || _a === void 0 ? void 0 : _a['content-type']) || method !== 'POST') {
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
@@ -1,7 +1,7 @@
1
1
  import { UploadFileInfo, UploadOptions } from './dist/index';
2
2
  export * from './dist/index';
3
3
 
4
- declare module '@midwayjs/core/dist/interface' {
4
+ declare module '@midwayjs/core' {
5
5
  interface MidwayConfig {
6
6
  upload?: Partial<UploadOptions>;
7
7
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@midwayjs/upload",
3
- "version": "3.1.4",
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.2",
29
- "@midwayjs/decorator": "^3.0.10",
30
- "@midwayjs/express": "^3.1.2",
31
- "@midwayjs/faas": "^3.1.2",
32
- "@midwayjs/koa": "^3.1.2",
33
- "@midwayjs/mock": "^3.1.2",
34
- "@midwayjs/serverless-app": "^3.1.4",
35
- "@midwayjs/web": "^3.1.4"
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": "ca98130962ab629a65912870f82f64bd0e44566d"
37
+ "gitHead": "8cb6db25f7eb794d9c61aaf69a43ac6506a289b5"
38
38
  }