﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
429	Upload.php issues after 2.4 update: wrong path, folder does not exist, file not uploading.	kevinkilcher	Frederico Caldeira Knabben	"After upgrading to fckeditor 2.4, I started having issues with uploading files using upload.php.

PROBLEM: Upload.php uploads files to Images, Files, Media and Flash while the browser uploads files to images, files, media and flash. Upload.php also assumes that the folder exists and if it does not then fck will return saying the file was uploaded successfully but the file will not be there.

SOLUTION: In the file fckeditor/editor/filemanager/upload/php/upload.php make the following changes. (My file's line numbers seem to be different than those in some of the documentation I have read, so I will include both the line number as well as the line to insert the code before or after):

At line 71 INSERT the following code:

// Convert $sType to lowercase to conform with changes made as of fck 2.4
$sType = strtolower($sType);

AFTER SendResults( 1, '', '', 'Invalid type specified' ) ;

This allows fck to validate the upload file type several lines earlier then changes the value of $sType for the remainder of the file.


At line 112 insert the following code:

// Creates the directory if it does not exist yet.
if(!is_dir($sServerDir)){
	mkdir($sServerDir);
}

AFTER the else statement and BEFORE if ( is_file( $sFilePath ) )

This will allow fck to create the upload file if it does not exist.


This ticket is related to ticket #274, #275 and #416.
"	Bug	closed	Normal		Server : PHP	FCKeditor 2.4	duplicate		
