I am using FCKeditor for my Drupal website. For whatever reason, FCKeditor does not allow a file to be overwritten...it will rename it instead which is no good for static links. I have found some code I think is responsible for renaming and have commented it out.
while ( true )
{
// Compose the file path.
$sFilePath = $sServerDir . $sFileName ;
// If a file with that name already exists.
//if ( is_file( $sFilePath ) )
//{
// $iCounter++ ;
// $sFileName = RemoveExtension( $sOriginalFileName ) . '(' . $iCounter . ').' . $sExtension ;
// $sErrorNumber = '201' ;
//}
//else
//{
move_uploaded_file( $oFile['tmp_name'], $sFilePath ) ;
if ( is_file( $sFilePath ) )
{
$oldumask = umask(0) ;
chmod( $sFilePath, 0777 ) ;
umask( $oldumask ) ;
}
if ( $Config['UseFileType'] )
$sFileUrl = $Config["UserFilesPath"] . strtolower($sType) . '/' . $sFileName ;
else
$sFileUrl = $Config["UserFilesPath"] . $sFileName ;
break ;
//}
}
SendResults( $sErrorNumber, $sFileUrl, $sFileName ) ;
?>
I have left in the "move_uploaded_file" but it is still checking and renaming. So either I am not commenting out enough or there is another file responsible. Any one ever work on this I would appreciate any tips you may have.
Thanks
DS