Hello, everybody!
I installed FCKeditor. When I upload file on server, it renames file if file with same name is exist. For example, file 'image.jpg'. It renames on 'image(1).jpg'
I don't need this option. It is better if it rewrites file with same name. What should I do it works?
Thanx for attention!
I installed FCKeditor. When I upload file on server, it renames file if file with same name is exist. For example, file 'image.jpg'. It renames on 'image(1).jpg'
I don't need this option. It is better if it rewrites file with same name. What should I do it works?
Thanx for attention!

Re: Renaming the file
Frederico Knabben
CKEditor Project Lead and CKSource Owner
--
Follow us on: Twitter | Facebook | Google+ | LinkedIn
Re: Renaming the file
Re: Renaming the file
Try this...
1. go into the editor->filemanager->connectors->php directory
2. open commands.php
3. go to line 203
4. find where it says:
5. inside the if statement, your'll see this:
if ( is_file( $sFilePath ) ) { $iCounter++ ; $sFileName = RemoveExtension( $sOriginalFileName ) . '(' . $iCounter . ').' . $sExtension ; $sErrorNumber = '201' ; }6. Comment this part of the "if" statement out and remove the else statement, e.g.
/* if ( is_file( $sFilePath ) ) { $iCounter++ ; $sFileName = RemoveExtension( $sOriginalFileName ) . '(' . $iCounter . ').' . $sExtension ; $sErrorNumber = '201' ; } else */ //{ move_uploaded_file( $oFile['tmp_name'], $sFilePath ) ; if ( is_file( $sFilePath ) ) { if ( isset( $Config['ChmodOnUpload'] ) && !$Config['ChmodOnUpload'] ) { break ; } $permissions = 0777; if ( isset( $Config['ChmodOnUpload'] ) && $Config['ChmodOnUpload'] ) { $permissions = $Config['ChmodOnUpload'] ; } $oldumask = umask(0) ; chmod( $sFilePath, $permissions ) ; umask( $oldumask ) ; } //}Now I'm not sure but I believe the move_uploaded_file function will overwrite the file by default. Otherwise add a line of code right above the move_uploaded_file function deleting the original file.
Hope this helps.
Classic ASP
Hi,
How woudl be possible to do the same change but for Classic ASP?
I am currently using the latest version of CKFinder with Classic ASP.
Kind regards,
Alejandro Genesio