Opened 17 years ago

Closed 17 years ago

#458 closed Bug (duplicate)

Upload dirs creation with $Config['UseFileType'] enabled

Reported by: octix Owned by: Frederico Caldeira Knabben
Priority: Normal Milestone:
Component: Server : PHP Version: FCKeditor 2.4
Keywords: Cc:

Description

Part 1

with $ConfigUseFileType? 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 = $GLOBALSUserFilesDirectory? . strtolower( $resourceType ) . '/' ;

to $sResourceTypePath = $GLOBALSUserFilesDirectory? . 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 ( $ConfigUseFileType? ) {

$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

Change History (1)

comment:1 Changed 17 years ago by Alfonso Martínez de Lizarrondo

Priority: HighNormal
Resolution: duplicate
Status: newclosed

The changes in #454 will take care of both issues.

Note: See TracTickets for help on using tickets.
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy