@strapi/provider-upload-local 4.0.0 → 4.0.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.
Files changed (2) hide show
  1. package/README.md +40 -19
  2. package/package.json +3 -6
package/README.md CHANGED
@@ -1,30 +1,51 @@
1
- # strapi-provider-upload-local
1
+ # @strapi/provider-upload-local
2
2
 
3
- ## Configurations
3
+ ## Resources
4
4
 
5
- This provider has only one parameter: `sizeLimit`.
5
+ - [LICENSE](LICENSE)
6
6
 
7
- **Example**
7
+ ## Links
8
8
 
9
- `./extensions/upload/config/settings.json`
9
+ - [Strapi website](https://strapi.io/)
10
+ - [Strapi documentation](https://docs.strapi.io)
11
+ - [Strapi community on Discord](https://discord.strapi.io)
12
+ - [Strapi news on Twitter](https://twitter.com/strapijs)
13
+
14
+ ## Installation
10
15
 
11
- ```json
12
- {
13
- "provider": "local",
14
- "providerOptions": {
15
- "sizeLimit": 100000
16
- }
17
- }
16
+ ```bash
17
+ # using yarn
18
+ yarn add @strapi/provider-upload-local
19
+
20
+ # using npm
21
+ npm install @strapi/provider-upload-local --save
18
22
  ```
19
23
 
20
- The `sizeLimit` parameter must be a number. Be aware that the unit is in bytes, and the default is 1000000. When setting this value high, you should make sure to also configure the body parser middleware `maxFileSize` so the file can be sent and processed. Read more [here](https://docs.strapi.io/developer-docs/latest/plugins/upload.html#configuration)
24
+ ## Configurations
21
25
 
22
- ## Resources
26
+ This provider has only one parameter: `sizeLimit`.
23
27
 
24
- - [License](LICENSE)
28
+ ### Provider Configuration
29
+
30
+ `./config/plugins.js`
31
+
32
+ ```js
33
+ module.exports = ({ env }) => ({
34
+ // ...
35
+ upload: {
36
+ config: {
37
+ provider: 'local',
38
+ providerOptions: {
39
+ sizeLimit: 100000,
40
+ },
41
+ },
42
+ },
43
+ // ...
44
+ });
45
+ ```
25
46
 
26
- ## Links
47
+ The `sizeLimit` parameter must be a number. Be aware that the unit is in bytes, and the default is 1000000. When setting this value high, you should make sure to also configure the body parser middleware `maxFileSize` so the file can be sent and processed. Read more [here](https://docs.strapi.io/developer-docs/latest/plugins/upload.html#configuration)
27
48
 
28
- - [Strapi website](https://strapi.io/)
29
- - [Strapi community on Slack](https://slack.strapi.io)
30
- - [Strapi news on Twitter](https://twitter.com/strapijs)
49
+ ### Security Middleware Configuration
50
+
51
+ Special configuration of the Strapi Security Middleware is not required on this provider since the default configuration allows loading images and media from `"'self'"`.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@strapi/provider-upload-local",
3
- "version": "4.0.0",
3
+ "version": "4.0.1",
4
4
  "description": "Local provider for strapi upload",
5
5
  "keywords": [
6
6
  "upload",
@@ -35,14 +35,11 @@
35
35
  "test": "echo \"no tests yet\""
36
36
  },
37
37
  "dependencies": {
38
- "@strapi/utils": "4.0.0"
38
+ "@strapi/utils": "4.0.1"
39
39
  },
40
40
  "engines": {
41
41
  "node": ">=12.x.x <=16.x.x",
42
42
  "npm": ">=6.0.0"
43
43
  },
44
- "strapi": {
45
- "isProvider": true
46
- },
47
- "gitHead": "b181702f0202b2c6d645d42b195a831f25cd0b03"
44
+ "gitHead": "e2cd01e8c6cbfeba15ad7787e38b6eebcbb92221"
48
45
  }