-
Bug
-
Resolution: Fixed
-
Minor
-
2.0.5, 2.1.2
-
MOODLE_20_STABLE, MOODLE_21_STABLE
-
MOODLE_21_STABLE, MOODLE_22_STABLE
-
The filemanager form element does not pass the accepted_types option on to the filepicker pop-up.
Fix:
In lib/form/filemanager.js, function initializer:
Find the section with all the 'this.filepicker_options.XXX = ' and add, at the end, the following line:
this.filepicker_options.accepted_types = options.accepted_types;
(Original test instructions follows)
Create a filemanager element and set the 'accepted_types' to, for example, array('*.jpg')
(e.g. in 'mod/form/post_form.php', line 88 - change "'accepted_types'=>''," to "accepted_types'=>array('.jpg'),")
Click 'Add'
Click 'Upload a file'
Choose any file on your local computer that is NOT a jpeg
Click 'Upload this file'
Expected:
Error message: XX filetype cannot be accepted
Actual:
File is accepted without complaint
- caused a regression
-
MDL-34507 Repositories with specific supported filetypes do not display in filepicker
-
- Closed
-