Merge branch 'master' into develop

This commit is contained in:
Alexandre Bodin 2019-10-21 09:13:39 +02:00
commit 61b7c28d1e
2 changed files with 6 additions and 2 deletions

View File

@ -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.
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
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.
:::

View File

@ -35,6 +35,8 @@ module.exports = {
deleteFile: false,
upload: {
description: 'Upload one file',
plugin: 'upload',
resolverOf: 'Upload.upload',
resolver: async (obj, { file: upload, ...fields }) => {
const file = await formatFile(upload, fields);
@ -57,6 +59,8 @@ module.exports = {
},
multipleUpload: {
description: 'Upload one file',
plugin: 'upload',
resolverOf: 'Upload.upload',
resolver: async (obj, { files: uploads, ...fields }) => {
const files = await Promise.all(
uploads.map(upload => formatFile(upload, fields))