A temporary fix:
in the file controller.php find the function "public function upload()"
and comment it /* */
| Code: |
/*public function upload()
{
global $mainframe, $option;
jimport('joomla.filesystem.file');
// Check for request forgeries
JRequest::checkToken( 'request' ) or jexit( 'Invalid Token' );
$file = JRequest::getVar( 'Filedata', '', 'files', 'array' );
$file['name'] = JFile::makeSafe($file['name']);
$err = '';
$config =& JComponentHelper::getParams( 'com_media' );
if( is_array($file) && $file['size'] > 0 )
{
if( $file['size'] > $config->get('upload_maxsize') )
{
$err = JText::_('File Size is too large. Maximum file size is '.( $config->get('upload_maxsize') / 1000 ).' KB') ;
$mainframe->redirect( "index2.php?option=$option&task=banners",$err );
return false;
}
}
$filepath = JPath::clean(JPATH_SITE.DS.'images'.DS.'banners'.DS.$file['name'] );
if (!JFile::upload($file['tmp_name'], $filepath))
{
$err = JText::_('Error uploading the file') ;
$mainframe->redirect( "index2.php?option=$option&task=banners",$err );
}
//return true;
//$mainframe->redirect( "index.php?option=com_media&tmpl=component&view=medialist&folder=banners", JText::_('Upload successfull') );
echo "<h2>" .JText::_('Upload successfull'). "</h2>";
} */
|