1
<cfsetting enablecfoutputonly="yes" showdebugoutput="no">
3
* FCKeditor - The text editor for Internet - http://www.fckeditor.net
4
* Copyright (C) 2003-2007 Frederico Caldeira Knabben
8
* Licensed under the terms of any of the following licenses at your
11
* - GNU General Public License Version 2 or later (the "GPL")
12
* http://www.gnu.org/licenses/gpl.html
14
* - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
15
* http://www.gnu.org/licenses/lgpl.html
17
* - Mozilla Public License Version 1.1 or later (the "MPL")
18
* http://www.mozilla.org/MPL/MPL-1.1.html
22
* File Browser connector for ColdFusion (MX 6.0 and above).
23
* (based on the original CF connector by Hendrik Kramer - hk@lwd.de)
26
<cfparam name="url.type" default="File">
27
<cfparam name="url.currentFolder" default="/">
29
<!--- note: no serverPath url parameter - see config.cfm if you need to set the serverPath manually --->
31
<cfinclude template="config.cfm">
32
<cfinclude template="cf_util.cfm">
33
<cfinclude template="cf_io.cfm">
34
<cfinclude template="cf_commands.cfm">
36
<cfset REQUEST.Config = Config>
37
<cfif find( "/", getBaseTemplatePath() ) >
38
<cfset REQUEST.Fs = "/">
40
<cfset REQUEST.Fs = "\">
43
<cfif not Config.Enabled>
44
<cfset SendUploadResults( '1', '', '', 'This file uploader is disabled. Please check the "editor/filemanager/connectors/cfm/config.cfm" file' )>
47
<cfset sCommand = 'QuickUpload'>
48
<cfset sType = "File">
50
<cfif isDefined( "URL.Type" )>
51
<cfset sType = URL.Type>
54
<cfset sCurrentFolder = GetCurrentFolder()>
56
<!--- Is enabled the upload? --->
57
<cfif not IsAllowedCommand( sCommand )>
58
<cfset SendUploadResults( "1", "", "", "The """ & sCommand & """ command isn't allowed" )>
61
<!--- Check if it is an allowed type. --->
62
<cfif not IsAllowedType( sType )>
63
<cfset SendUploadResults( "1", "", "", "Invalid type specified" ) >
66
<cfset FileUpload( sType, sCurrentFolder, sCommand )>
1
<cfsetting enablecfoutputonly="yes" showdebugoutput="no">
3
* FCKeditor - The text editor for Internet - http://www.fckeditor.net
4
* Copyright (C) 2003-2007 Frederico Caldeira Knabben
8
* Licensed under the terms of any of the following licenses at your
11
* - GNU General Public License Version 2 or later (the "GPL")
12
* http://www.gnu.org/licenses/gpl.html
14
* - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
15
* http://www.gnu.org/licenses/lgpl.html
17
* - Mozilla Public License Version 1.1 or later (the "MPL")
18
* http://www.mozilla.org/MPL/MPL-1.1.html
22
* File Browser connector for ColdFusion (MX 6.0 and above).
23
* (based on the original CF connector by Hendrik Kramer - hk@lwd.de)
26
<cfparam name="url.type" default="File">
27
<cfparam name="url.currentFolder" default="/">
29
<!--- note: no serverPath url parameter - see config.cfm if you need to set the serverPath manually --->
31
<cfinclude template="config.cfm">
32
<cfinclude template="cf_util.cfm">
33
<cfinclude template="cf_io.cfm">
34
<cfinclude template="cf_commands.cfm">
36
<cfset REQUEST.Config = Config>
37
<cfif find( "/", getBaseTemplatePath() ) >
38
<cfset REQUEST.Fs = "/">
40
<cfset REQUEST.Fs = "\">
43
<cfif not Config.Enabled>
44
<cfset SendUploadResults( '1', '', '', 'This file uploader is disabled. Please check the "editor/filemanager/connectors/cfm/config.cfm" file' )>
47
<cfset sCommand = 'QuickUpload'>
48
<cfset sType = "File">
50
<cfif isDefined( "URL.Type" )>
51
<cfset sType = URL.Type>
54
<cfset sCurrentFolder = GetCurrentFolder()>
56
<!--- Is enabled the upload? --->
57
<cfif not IsAllowedCommand( sCommand )>
58
<cfset SendUploadResults( "1", "", "", "The """ & sCommand & """ command isn't allowed" )>
61
<!--- Check if it is an allowed type. --->
62
<cfif not IsAllowedType( sType )>
63
<cfset SendUploadResults( "1", "", "", "Invalid type specified" ) >
66
<cfset FileUpload( sType, sCurrentFolder, sCommand )>