Changeset 389
- Timestamp:
- 2007-06-23 22:51:49 (18 months ago)
- Location:
- FCKeditor/branches/developers/alfonsoml/editor/filemanager/connectors/asp
- Files:
-
- 2 modified
-
config.asp (modified) (3 diffs)
-
io.asp (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
FCKeditor/branches/developers/alfonsoml/editor/filemanager/connectors/asp/config.asp
r318 r389 29 29 ConfigIsEnabled = False 30 30 31 ' @Packager.Remove.Start 32 ' Attention: In the development version (SVN) the ASP connector is enabled by default. 31 33 ConfigIsEnabled = true 34 ' @Packager.Remove.End 35 32 36 33 37 ' Path to user files relative to the document root. 38 ' This setting is preserved only for backward compatibility. 39 ' You should look at the settings for each resource type to get the full potential 34 40 Dim ConfigUserFilesPath 35 41 ConfigUserFilesPath = "/userfiles/" … … 64 70 ' Attention: It must start and end with a slash: '/' 65 71 ' 72 ' - FileTypesAbsolutePath: the physical path to the above folder. It must be 73 ' an absolute path. 74 ' If it's an empty string then it will be autocalculated. 75 ' Usefull if you are using a virtual directory, symbolic link or alias. 76 ' Examples: 'C:\\MySite\\userfiles\\' or '/root/mysite/userfiles/'. 77 ' Attention: The above 'FileTypesPath' must point to the same directory. 78 ' Attention: It must end with a slash: '/' 79 ' 66 80 ' - QuickUploadPath: the virtual folder relative to the document root where 67 81 ' these resources will be uploaded using the Upload tab in the resources … … 69 83 ' Attention: It must start and end with a slash: '/' 70 84 ' 85 ' - QuickUploadAbsolutePath: the physical path to the above folder. It must be 86 ' an absolute path. 87 ' If it's an empty string then it will be autocalculated. 88 ' Usefull if you are using a virtual directory, symbolic link or alias. 89 ' Examples: 'C:\\MySite\\userfiles\\' or '/root/mysite/userfiles/'. 90 ' Attention: The above 'QuickUploadPath' must point to the same directory. 91 ' Attention: It must end with a slash: '/' 92 ' 71 93 72 Dim ConfigAllowedExtensions, ConfigDeniedExtensions, ConfigFileTypesPath, Config QuickUploadPath94 Dim ConfigAllowedExtensions, ConfigDeniedExtensions, ConfigFileTypesPath, ConfigFileTypesAbsolutePath, ConfigQuickUploadPath, ConfigQuickUploadAbsolutePath 73 95 Set ConfigAllowedExtensions = CreateObject( "Scripting.Dictionary" ) 74 96 Set ConfigDeniedExtensions = CreateObject( "Scripting.Dictionary" ) 75 97 Set ConfigFileTypesPath = CreateObject( "Scripting.Dictionary" ) 98 Set ConfigFileTypesAbsolutePath = CreateObject( "Scripting.Dictionary" ) 76 99 Set ConfigQuickUploadPath = CreateObject( "Scripting.Dictionary" ) 100 Set ConfigQuickUploadAbsolutePath = CreateObject( "Scripting.Dictionary" ) 77 101 78 102 ConfigAllowedExtensions.Add "File", "" 79 103 ConfigDeniedExtensions.Add "File", "html|htm|php|php2|php3|php4|php5|phtml|pwml|inc|asp|aspx|ascx|jsp|cfm|cfc|pl|bat|exe|com|dll|vbs|js|reg|cgi|htaccess|asis|sh|shtml|shtm|phtm" 80 ConfigFileTypesPath.Add "File", ConfigUserFilesPath & "file/" 104 ConfigFileTypesPath.Add "File", "http://127.0.0.1/userfiles/file/" 105 ConfigFileTypesAbsolutePath.Add "File", "d:\inetpub\wwwroot\docs\file\" 81 106 ConfigQuickUploadPath.Add "File", ConfigUserFilesPath 107 ConfigQuickUploadAbsolutePath.Add "File", "" 82 108 83 109 ConfigAllowedExtensions.Add "Image", "jpg|gif|jpeg|png|bmp" 84 110 ConfigDeniedExtensions.Add "Image", "" 85 ConfigFileTypesPath.Add "Image", ConfigUserFilesPath & "image/" 111 ConfigFileTypesPath.Add "Image", "http://127.0.0.1/userfiles/image/" 112 ConfigFileTypesAbsolutePath.Add "Image", "d:\inetpub\wwwroot\docs\image\" 86 113 ConfigQuickUploadPath.Add "Image", ConfigUserFilesPath 114 ConfigQuickUploadAbsolutePath.Add "Image", "" 87 115 88 116 ConfigAllowedExtensions.Add "Flash", "swf|fla" 89 117 ConfigDeniedExtensions.Add "Flash", "" 90 118 ConfigFileTypesPath.Add "Flash", ConfigUserFilesPath & "flash/" 119 ConfigFileTypesAbsolutePath.Add "Flash", "" 91 120 ConfigQuickUploadPath.Add "Flash", ConfigUserFilesPath 121 ConfigQuickUploadAbsolutePath.Add "Flash", "" 92 122 93 123 ConfigAllowedExtensions.Add "Media", "swf|fla|jpg|gif|jpeg|png|avi|mpg|mpeg|mp(1-4)|wma|wmv|wav|mid|midi|rmi|rm|ram|rmvb|mov|qt" 94 124 ConfigDeniedExtensions.Add "Media", "" 95 125 ConfigFileTypesPath.Add "Media", ConfigUserFilesPath & "media/" 126 ConfigFileTypesAbsolutePath.Add "Media", "" 96 127 ConfigQuickUploadPath.Add "Media", ConfigUserFilesPath 128 ConfigQuickUploadAbsolutePath.Add "Media", "" 97 129 98 130 %> -
FCKeditor/branches/developers/alfonsoml/editor/filemanager/connectors/asp/io.asp
r318 r389 34 34 end Function 35 35 36 Function GetResourceTypeDirectory( resourceType, sCommand ) 37 if ( sCommand = "QuickUpload") then 38 39 if ( ConfigQuickUploadAbsolutePath.Item( resourceType ) <> "" ) then 40 GetResourceTypeDirectory = ConfigQuickUploadAbsolutePath.Item( resourceType ) 41 else 42 ' Map the "UserFiles" path to a local directory. 43 GetResourceTypeDirectory = Server.MapPath( ConfigQuickUploadPath.Item( resourceType ) ) 44 end if 45 else 46 if ( ConfigFileTypesAbsolutePath.Item( resourceType ) <> "" ) then 47 GetResourceTypeDirectory = ConfigFileTypesAbsolutePath.Item( resourceType ) 48 else 49 ' Map the "UserFiles" path to a local directory. 50 GetResourceTypeDirectory = Server.MapPath( ConfigFileTypesPath.Item( resourceType ) ) 51 end if 52 end if 53 end Function 54 36 55 Function GetUrlFromPath( resourceType, folderPath, sCommand ) 37 56 GetUrlFromPath = CombinePaths( GetResourceTypePath( resourceType, sCommand ), folderPath ) … … 43 62 44 63 Function ServerMapFolder( resourceType, folderPath, sCommand ) 45 ' Map the "UserFiles" path to a local directory.46 64 Dim sResourceTypePath 47 sResourceTypePath = Server.MapPath( GetResourceTypePath( resourceType, sCommand ) ) 65 ' Get the resource type directory. 66 sResourceTypePath = GetResourceTypeDirectory( resourceType, sCommand ) 48 67 49 68 ' Ensure that the directory exists.