Problem Exists in administrator/components/com_media/admin.media.php
As the function steps throught the array, if variable $format does not equal $ext, it will echo the message saying "File Type Not Support"
To fix this, i removed the strcasecmp and added the function strtolower() on $format.
Fix:
On line 160
Change
Code:
$format = substr( $file['name'], -3 );
to
Code:
$format = strtolower(substr( $file['name'], -3 ));
Around line 179 remove the following code
Code:
foreach( $allowable as $ext ) {
if ( strcasecmp( $format, $ext ) ) {
mosRedirect( "index2.php?option=com_media&listdir=".$_POST['dirPath'],
'This file type is not supported' );
}
}
And replace it with
Code:
$allowed = FALSE;
foreach( $allowable as $ext ) {
if ( $ext == $format){
$allowed = TRUE;
}
}
if ($allowed == FALSE){
mosRedirect( "index2.php?option=com_media&listdir=".$_POST['dirPath'],
'This file type is not supported');
}
Furthermore, file extenstions that are ".jpeg" will not work with Media manager. This is because of the following function
Code:
substr( $file['name'], -3 )
To fix this
Add
Code:
Change array allowable at line 169 from
$allowable = array (
'xcf',
'odg',
'gif',
'jpg',
'png',
'bmp',
'doc',
'xls',
'ppt',
'swf',
'pdf',
'odt',
'ods',
'odp'
);
to
Code:
$allowable = array (
'xcf',
'odg',
'gif',
'jpg',
'png',
'bmp',
'doc',
'xls',
'ppt',
'swf',
'pdf',
'odt',
'ods',
'odp',
'epg'
);
Notice the epg at the end. This is because the substr function only takes off the last three characters of the file extenstion.
Thus "jpeg" would be "epg"
Kudos to gunther
http://forum.joomla.org/index.php/topic ... l#msg48059The following code would work if you added strtolower() to the $format = substr( $file['name'], -3 );
Otherwise, the file type JPG wouldnt not work.. Only jpg..
NOTE TO gunther: You beat me by 10 min or so.. Need coffee!!