Versions:
Drupal 7.0
IMCE 7.x-1.1
WYSIWYG 7.x-2.0
CKEditor 3.5 (revision 6260)
IMCE Mkdir 7.x-1.0-beta2
IMCE Wysiwyg bridge 7.x-1.x-dev (11/07/10)
It is not possible to upload files with extensions other than "jpg jpeg gif png txt doc xls pdf ppt pps odt ods odp".
For exemple a swf file can't be uploaded.
Restricting the uploaded extensions for example just to txt files works well, but if I try to add extensions that are not in the list above or if I use * (like the default for User-1 Profile) in the "Permitted file extensions" field the uploads are still restricted to the above list.
This behaviour happens in the User profile File Browser Tab and in the wysiwyg editor, so I think the problem is in the IMCE module.
Debugging the code this problem seems to be related to the fact that the structure of the $validators array() used in line 287 of imce.page.inc does not match the expected structure of file_save_upload().
Comment | File | Size | Author |
---|---|---|---|
#3 | imce.extension.validator-1018344-3.patch | 1.36 KB | tekante |
#1 | imce.extension.validator.patch | 1.35 KB | ufku |
Comments
Comment #1
ufku CreditAttribution: ufku commentedfile_save_upload appears to use the default extension validator when none is specified, which results in two separate extension validators.
The patch fixes this.
Comment #2
mabuweb CreditAttribution: mabuweb commentedI applied your patch and it solves the problem for me.
Thank you!
Comment #3
tekante CreditAttribution: tekante commentedSimple update to patch so tools like drush make can make use of it
Comment #6
lpeabody CreditAttribution: lpeabody at Genuine commentedRe-opening this as it never made it's way into 7.x-1.x-dev. I've tested this and confirmed it works. Thanks!
Comment #7
ufku CreditAttribution: ufku commented