﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
458	Upload dirs creation with $Config['UseFileType'] enabled	octix	Frederico Caldeira Knabben	"Part 1

with $Config['UseFileType'] enabled, Upload connector creates Image, File, Flash etc... dirs, but in lower case !!!, should be ucfirst-ed too, not just strtolower-ed, based on file type.

For example
We have Image dialog, there we can browse server & upload files. When we go to browser server ""image"" dir is created. but should be ""Image"" as url is set to /uploads/Image/Imagename.jpg
but real one is /uploads/image/Imagename.jpg

i'm not sure but io.php should be changed, at least in my case it worked
function  ServerMapFolder

from 
$sResourceTypePath = $GLOBALS[""UserFilesDirectory""] . strtolower( $resourceType ) . '/' ;

to 
$sResourceTypePath = $GLOBALS[""UserFilesDirectory""] . ucfirst(strtolower( $resourceType )) . '/' ;


Part 2
second small bug is that if we go directly to Upload tab & try to upload it doesn't create these dirs... i have modified for me upload.php
if ( $Config['UseFileType'] )
{
	$sServerDir .= $sType . '/' ;
    if (!file_exists($sServerDir))
    {
        / To create the folder with 0777 permissions, we need to set umask to zero.
        $oldumask = umask(0) ;
        mkdir( $sServerDir, 0777 ) ;
        umask( $oldumask ) ;
    }
}

now it works for me...

hope i have described enough my issue"	Bug	closed	Normal		Server : PHP	FCKeditor 2.4	duplicate		
