Opened 18 years ago
Closed 18 years ago
#429 closed Bug (duplicate)
Upload.php issues after 2.4 update: wrong path, folder does not exist, file not uploading.
Reported by: | kevinkilcher | Owned by: | Frederico Caldeira Knabben |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | Server : PHP | Version: | FCKeditor 2.4 |
Keywords: | Cc: |
Description
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.
Change History (1)
comment:1 Changed 18 years ago by
Keywords: | upload.php removed |
---|---|
Resolution: | → duplicate |
Status: | new → closed |
The first part is #274, and the mkdir issue is #416 Closing as dup