mirror of
https://github.com/strapi/strapi.git
synced 2025-12-14 16:51:55 +00:00
Merge branch 'master' of https://github.com/strapi/strapi
This commit is contained in:
commit
89f940eb84
@ -115,11 +115,9 @@ module.exports = ({ models, target }, ctx) => {
|
|||||||
|
|
||||||
// Add virtual key to provide populate and reverse populate
|
// Add virtual key to provide populate and reverse populate
|
||||||
_.forEach(
|
_.forEach(
|
||||||
_.pickBy(definition.loadedModel, model => {
|
_.pickBy(definition.loadedModel, ({ type }) => type === 'virtual'),
|
||||||
return model.type === 'virtual';
|
|
||||||
}),
|
|
||||||
(value, key) => {
|
(value, key) => {
|
||||||
schema.virtual(key.replace('_v', ''), {
|
schema.virtual(key, {
|
||||||
ref: value.ref,
|
ref: value.ref,
|
||||||
localField: '_id',
|
localField: '_id',
|
||||||
foreignField: value.via,
|
foreignField: value.via,
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
## Configurations
|
## Configurations
|
||||||
|
|
||||||
Your configuration is passed down to the cloudinary configuration. (e.g: `cloudinary.config(config)`). You can see the complete list of options [here](https://cloudinary.com/documentation/cloudinary_sdks#configuration_parameters)
|
This provider has only one parameter: `sizeLimit`.
|
||||||
|
|
||||||
**Example**
|
**Example**
|
||||||
|
|
||||||
@ -10,14 +10,14 @@ Your configuration is passed down to the cloudinary configuration. (e.g: `cloudi
|
|||||||
|
|
||||||
```json
|
```json
|
||||||
{
|
{
|
||||||
"provider": "cloudinary",
|
"provider": "local",
|
||||||
"providerOptions": {
|
"providerOptions": {
|
||||||
"sizeLimit": 100000
|
"sizeLimit": 100000
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
The `sizeLimit` parameter must be a number. Be aware that the unit is in KB. 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://strapi.io/documentation/v3.x/plugins/upload.html#configuration)
|
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://strapi.io/documentation/v3.x/plugins/upload.html#configuration)
|
||||||
|
|
||||||
## Resources
|
## Resources
|
||||||
|
|
||||||
@ -28,7 +28,3 @@ The `sizeLimit` parameter must be a number. Be aware that the unit is in KB. Whe
|
|||||||
- [Strapi website](http://strapi.io/)
|
- [Strapi website](http://strapi.io/)
|
||||||
- [Strapi community on Slack](http://slack.strapi.io)
|
- [Strapi community on Slack](http://slack.strapi.io)
|
||||||
- [Strapi news on Twitter](https://twitter.com/strapijs)
|
- [Strapi news on Twitter](https://twitter.com/strapijs)
|
||||||
|
|
||||||
```
|
|
||||||
|
|
||||||
```
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user