-
Bug
-
Resolution: Fixed
-
Minor
-
3.9
-
MOODLE_39_STABLE
-
MOODLE_401_STABLE, MOODLE_402_STABLE
-
MDL-69187-401 -
This issue is found while trying to correct MDL-69141.
If a form specifies the valid extensions in the file picker as:
$options['accepted_types'] = '.html, .txt'; |
The file picker does not show the valid extensions to the user and the form can be submitted
but, if the user tries to upload (and submit the form) an invalid file gets an inline red error:
On the other hand, if the same form specifies the extensions like this:
$options['accepted_types'] = ['.html', '.txt']; |
The file picker shows the valid extensions correctly
but, when the user uploads an invalid file, get a modal error instantly:
Possible solutions
- Unify the error messages format to have a coherent UX
- In both string or array accepted_type, the file picker should show the valid extensions under the file picker.
- Discovered while testing
-
MDL-69141 Content Banks does not handle multiple file extensions correctly
-
- Closed
-
- Testing discovered
-
MDL-78688 Uploading admin preset gives no indication of accepted file types
-
- Closed
-
- will help resolve
-
MDL-61588 File upload with limited file types: improve the message if you upload the wrong type
-
- Open
-