Opened 18 years ago
Closed 18 years ago
#225 closed Bug (fixed)
CF uploaded does not create directories as specified in the docs
Reported by: | Frank M Thompson | Owned by: | |
---|---|---|---|
Priority: | Normal | Milestone: | FCKeditor 2.4.3 |
Component: | Server : ColdFusion | Version: | FCKeditor 2.4 |
Keywords: | Cc: |
Description
The docs clearly state that directories for user files will be created when needed. While this does work for the file browser, it does now work for the uploaded. To fix this you need to add this code:
<cfif not directoryExists(currentFolderPath)>
<cfdirectory action="create" directory="#currentFolderPath#"/>
</cfif>
after this line of code on about line 93 of the upload.cfm file in /filemanager/upload/cfm/
<cfset currentFolderPath = userFilesServerPath & url.type & fs>
Please note that this is probably a quick fix and will create the whole directory structure if non existant. For example if you accidentally put 'useFiles' instead of 'Userfiles' it will create the folder 'useFiles'. This is the nature of the cfdirectory tag as it will create the whole path. If you want it to merely create the directory in the last of the list (for example the 'Image' in 'Userfiles/Image' I can create that code for you and have it throw and error if the 'UserFiles' directory is non existant.
I however find this needless since the directory structure should not be dynamic (with the exception of user directories, which i like the method I used since it only created the user directory when that user stores a file and doesn't force me to create a user directory when that user is created).
Change History (2)
comment:1 Changed 18 years ago by
Keywords: | upload Coldfusion removed |
---|---|
Milestone: | → FCKeditor 2.4.3 |
comment:2 Changed 18 years ago by
Resolution: | → fixed |
---|---|
Status: | new → closed |
Your solution is ok sirmeili.
Fixed with [349].
Click here for more info about our SVN system.