@strapi/strapi 4.1.0 → 4.1.1-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.
@@ -1,6 +1,7 @@
1
1
  'use strict';
2
2
 
3
- const { defaultsDeep } = require('lodash/fp');
3
+ const fse = require('fs-extra');
4
+ const { defaultsDeep, get } = require('lodash/fp');
4
5
  const body = require('koa-body');
5
6
 
6
7
  const defaults = {
@@ -29,5 +30,18 @@ module.exports = config => {
29
30
 
30
31
  throw e;
31
32
  }
33
+
34
+ // clean any file that was uploaded
35
+ const files = get('request.files.files', ctx);
36
+ if (files) {
37
+ if (Array.isArray(files)) {
38
+ // not awaiting to not slow the request
39
+ Promise.all(files.map(file => fse.remove(file.path)));
40
+ } else if (files && files.path) {
41
+ // not awaiting to not slow the request
42
+ fse.remove(files.path);
43
+ }
44
+ delete ctx.request.files;
45
+ }
32
46
  };
33
47
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@strapi/strapi",
3
- "version": "4.1.0",
3
+ "version": "4.1.1-alpha.0",
4
4
  "description": "An open source headless CMS solution to create and manage your own API. It provides a powerful dashboard and features to make your life easier. Databases supported: MySQL, MariaDB, PostgreSQL, SQLite",
5
5
  "keywords": [
6
6
  "strapi",
@@ -80,16 +80,16 @@
80
80
  "dependencies": {
81
81
  "@koa/cors": "3.1.0",
82
82
  "@koa/router": "10.1.1",
83
- "@strapi/admin": "4.1.0",
84
- "@strapi/database": "4.1.0",
85
- "@strapi/generate-new": "4.1.0",
86
- "@strapi/generators": "4.1.0",
87
- "@strapi/logger": "4.1.0",
88
- "@strapi/plugin-content-manager": "4.1.0",
89
- "@strapi/plugin-content-type-builder": "4.1.0",
90
- "@strapi/plugin-email": "4.1.0",
91
- "@strapi/plugin-upload": "4.1.0",
92
- "@strapi/utils": "4.1.0",
83
+ "@strapi/admin": "4.1.1-alpha.0",
84
+ "@strapi/database": "4.1.1-alpha.0",
85
+ "@strapi/generate-new": "4.1.1-alpha.0",
86
+ "@strapi/generators": "4.1.1-alpha.0",
87
+ "@strapi/logger": "4.1.1-alpha.0",
88
+ "@strapi/plugin-content-manager": "4.1.1-alpha.0",
89
+ "@strapi/plugin-content-type-builder": "4.1.1-alpha.0",
90
+ "@strapi/plugin-email": "4.1.1-alpha.0",
91
+ "@strapi/plugin-upload": "4.1.1-alpha.0",
92
+ "@strapi/utils": "4.1.1-alpha.0",
93
93
  "bcryptjs": "2.4.3",
94
94
  "boxen": "5.1.2",
95
95
  "chalk": "4.1.2",
@@ -136,5 +136,5 @@
136
136
  "node": ">=12.22.0 <=16.x.x",
137
137
  "npm": ">=6.0.0"
138
138
  },
139
- "gitHead": "d4273d81fbeec230b5734375e43a5f1f1f2a0231"
139
+ "gitHead": "bedb04a0cc23719e4eac43e6005fe0fa3d48a9a6"
140
140
  }