mirror of
https://github.com/strapi/strapi.git
synced 2025-11-11 15:49:50 +00:00
Merge branch 'master' into develop
This commit is contained in:
commit
61b7c28d1e
@ -22,8 +22,8 @@ The admin panel is a `node_module` that is similar to a plugin but the slight di
|
|||||||
|
|
||||||
To extend this package you will have to create an `admin` folder at the root of your application.
|
To extend this package you will have to create an `admin` folder at the root of your application.
|
||||||
|
|
||||||
In this folder you will be able to override admin flies and functions.
|
In this folder you will be able to override admin files and functions.
|
||||||
|
|
||||||
::: note
|
::: note
|
||||||
For more details, visit the [admin panel constomization](../admin-panel/customization.md) documentation.
|
For more details, visit the [admin panel customization](../admin-panel/customization.md) documentation.
|
||||||
:::
|
:::
|
||||||
|
|||||||
@ -35,6 +35,8 @@ module.exports = {
|
|||||||
deleteFile: false,
|
deleteFile: false,
|
||||||
upload: {
|
upload: {
|
||||||
description: 'Upload one file',
|
description: 'Upload one file',
|
||||||
|
plugin: 'upload',
|
||||||
|
resolverOf: 'Upload.upload',
|
||||||
resolver: async (obj, { file: upload, ...fields }) => {
|
resolver: async (obj, { file: upload, ...fields }) => {
|
||||||
const file = await formatFile(upload, fields);
|
const file = await formatFile(upload, fields);
|
||||||
|
|
||||||
@ -57,6 +59,8 @@ module.exports = {
|
|||||||
},
|
},
|
||||||
multipleUpload: {
|
multipleUpload: {
|
||||||
description: 'Upload one file',
|
description: 'Upload one file',
|
||||||
|
plugin: 'upload',
|
||||||
|
resolverOf: 'Upload.upload',
|
||||||
resolver: async (obj, { files: uploads, ...fields }) => {
|
resolver: async (obj, { files: uploads, ...fields }) => {
|
||||||
const files = await Promise.all(
|
const files = await Promise.all(
|
||||||
uploads.map(upload => formatFile(upload, fields))
|
uploads.map(upload => formatFile(upload, fields))
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user