Config = StructNew() ; // SECURITY: You must explicitly enable this "connector". (Set enabled to "true") Config.Enabled = false ; // Path to uploaded files relative to the document root. Config.UserFilesPath = "/userfiles/" ; // Use this to force the server path if FCKeditor is not running directly off // the root of the application or the FCKeditor directory in the URL is a virtual directory // or a symbolic link / junction // Example: C:\inetpub\wwwroot\myDocs\ Config.ServerPath = "" ; // Due to security issues with Apache modules, it is recommended to leave the // following setting enabled. Config.ForceSingleExtension = true ; // Perform additional checks for image files - if set to true, validate image size // (This feature works in MX 6.0 and above) Config.SecureImageUploads = true; // What the user can do with this connector Config.ConfigAllowedCommands = "QuickUpload,FileUpload,GetFolders,GetFoldersAndFiles,CreateFolder" ; //Allowed Resource Types Config.ConfigAllowedTypes = "File,Image,Flash,Media" ; // For security, HTML is allowed in the first Kb of data for files having the // following extensions only. // (This feature works in MX 6.0 and above)) Config.HtmlExtensions = "html,htm,xml,xsd,txt,js" ; //Due to known issues with GetTempDirectory function, it is //recommended to set this vairiable to a valid directory //instead of using the GetTempDirectory function //(used by MX 6.0 and above) Config.TempDirectory = GetTempDirectory(); // Configuration settings for each Resource Type // // - AllowedExtensions: the possible extensions that can be allowed. // If it is empty then any file type can be uploaded. // - DeniedExtensions: The extensions that won't be allowed. // If it is empty then no restrictions are done here. // // For a file to be uploaded it has to fulfill both the AllowedExtensions // and DeniedExtensions (that's it: not being denied) conditions. // // - FileTypesPath: the virtual folder relative to the document root where // these resources will be located. // Attention: It must start and end with a slash: '/' // // - FileTypesAbsolutePath: the physical path to the above folder. It must be // an absolute path. // If it's an empty string then it will be autocalculated. // Usefull if you are using a virtual directory, symbolic link or alias. // Examples: 'C:\\MySite\\userfiles\\' or '/root/mysite/userfiles/'. // Attention: The above 'FileTypesPath' must point to the same directory. // Attention: It must end with a slash: '/' // // // - QuickUploadPath: the virtual folder relative to the document root where // these resources will be uploaded using the Upload tab in the resources // dialogs. // Attention: It must start and end with a slash: '/' // // - QuickUploadAbsolutePath: the physical path to the above folder. It must be // an absolute path. // If it's an empty string then it will be autocalculated. // Usefull if you are using a virtual directory, symbolic link or alias. // Examples: 'C:\\MySite\\userfiles\\' or '/root/mysite/userfiles/'. // Attention: The above 'QuickUploadPath' must point to the same directory. // Attention: It must end with a slash: '/' Config.AllowedExtensions = StructNew() ; Config.DeniedExtensions = StructNew() ; Config.FileTypesPath = StructNew() ; Config.FileTypesAbsolutePath = StructNew() ; Config.QuickUploadPath = StructNew() ; Config.QuickUploadAbsolutePath = StructNew() ; Config.AllowedExtensions["File"] = "7z,aiff,asf,avi,bmp,csv,doc,fla,flv,gif,gz,gzip,jpeg,jpg,mid,mov,mp3,mp4,mpc,mpeg,mpg,ods,odt,pdf,png,ppt,pxd,qt,ram,rar,rm,rmi,rmvb,rtf,sdc,sitd,swf,sxc,sxw,tar,tgz,tif,tiff,txt,vsd,wav,wma,wmv,xls,xml,zip" ; Config.DeniedExtensions["File"] = "" ; Config.FileTypesPath["File"] = Config.UserFilesPath & 'file/' ; Config.FileTypesAbsolutePath["File"] = iif( Config.ServerPath eq "", de(""), de(Config.ServerPath & 'file/') ) ; Config.QuickUploadPath["File"] = Config.FileTypesPath["File"] ; Config.QuickUploadAbsolutePath["File"] = Config.FileTypesAbsolutePath["File"] ; Config.AllowedExtensions["Image"] = "bmp,gif,jpeg,jpg,png" ; Config.DeniedExtensions["Image"] = "" ; Config.FileTypesPath["Image"] = Config.UserFilesPath & 'image/' ; Config.FileTypesAbsolutePath["Image"] = iif( Config.ServerPath eq "", de(""), de(Config.ServerPath & 'image/') ) ; Config.QuickUploadPath["Image"] = Config.FileTypesPath["Image"] ; Config.QuickUploadAbsolutePath["Image"] = Config.FileTypesAbsolutePath["Image"] ; Config.AllowedExtensions["Flash"] = "swf,flv" ; Config.DeniedExtensions["Flash"] = "" ; Config.FileTypesPath["Flash"] = Config.UserFilesPath & 'flash/' ; Config.FileTypesAbsolutePath["Flash"] = iif( Config.ServerPath eq "", de(""), de(Config.ServerPath & 'flash/') ) ; Config.QuickUploadPath["Flash"] = Config.FileTypesPath["Flash"] ; Config.QuickUploadAbsolutePath["Flash"] = Config.FileTypesAbsolutePath["Flash"] ; Config.AllowedExtensions["Media"] = "aiff,asf,avi,bmp,fla,flv,gif,jpeg,jpg,mid,mov,mp3,mp4,mpc,mpeg,mpg,png,qt,ram,rm,rmi,rmvb,swf,tif,tiff,wav,wma,wmv" ; Config.DeniedExtensions["Media"] = "" ; Config.FileTypesPath["Media"] = Config.UserFilesPath & 'media/' ; Config.FileTypesAbsolutePath["Media"] = iif( Config.ServerPath eq "", de(""), de(Config.ServerPath & 'media/') ) ; Config.QuickUploadPath["Media"] = Config.FileTypesPath["Media"] ; Config.QuickUploadAbsolutePath["Media"] = Config.FileTypesAbsolutePath["Media"] ;