mirror of
https://github.com/strapi/strapi.git
synced 2025-09-01 21:03:02 +00:00
Move error message to translation
This commit is contained in:
parent
28506035cf
commit
0071d28f22
@ -21,6 +21,9 @@
|
||||
"PluginInputFile.link": "browse",
|
||||
"PluginInputFile.loading": "Your files are being uploaded...",
|
||||
"PluginInputFile.text": "Drag & drop your files into this area or {link} from a file to upload",
|
||||
"Upload.status.empty": "Files are empty",
|
||||
"Upload.status.disabled": "File upload is disabled",
|
||||
"Upload.status.sizeLimit": "{file} file is bigger than limit size!",
|
||||
"notification.config.success": "The settings has been updated",
|
||||
"notification.delete.success": "The file has been deleted",
|
||||
"notification.dropFile.success": "Your file has been uploaded",
|
||||
|
@ -27,7 +27,7 @@ module.exports = {
|
||||
const { files = {} } = ctx.request.body.files;
|
||||
|
||||
if (_.isEmpty(files)) {
|
||||
return ctx.badRequest(null, 'Files are empty');
|
||||
return ctx.badRequest(null, ctx.request.admin ? [{ messages: [{ id: 'Upload.status.empty' }] }] : 'Files are empty');
|
||||
}
|
||||
|
||||
// Transform stream files to buffer
|
||||
|
Loading…
x
Reference in New Issue
Block a user