-
Bug
-
Resolution: Fixed
-
Critical
-
2.3
-
None
-
MOODLE_23_STABLE
-
MOODLE_23_STABLE
-
wip-
MDL-34117-master -
To reproduce attempt to drag and drop an image file to the user profile edit page (editadvanced.php). An error is produced...
Image (GIF) filetype cannot be accepted.
Analysis:
The failure is in repository/upload/lib.php at line 183. This list of mimetypes ($this->mimetypes) appears to contain garbage.
This list is generated from the 'accepted_types' array parameter on the editadvanced.php web form. This looks like the following...
"accepted_types":"web_image"
This is passed into process_upload as an array (in parameter $types). Each type (there is only 'web_image') is then sent through the function mimeinfo() a few lines down. This, for web_image returns 'document/unknown' which breaks the upload.
- duplicates
-
MDLSITE-1822 Drag and drop image mime-type into file manager broken
- Closed