|
Article relates to
|
RadFileExplorer Q3 2009 SP1
|
|
Created by
|
Fiko
|
|
Last modified
|
September 08, 2010
|
|
Last modified by
|
Fiko
|
HOW TO
Connect the
RadFileExplorer control (used in the
RadEditor's dialogs as well) to an FTP file system.
THE FIRST STEP
First we need to determine the format of the paths that can be set to the
ViewPaths,
DeletePaths and the
UploadPaths properties of the
RadFileExplorer control. In the current implementation, the path format looks like this:
Real FTP path:
|
ftp://localhost/FtpSource/ |
Path set to RadFileExplorer:
|
/FtpSource/ |
The protocol and the server name, and other configurations (like user name and password) are exposed in an configuration file named
FtpSettings.config. That file should be referred by using
configSource property of the <appSettings> tag inside the Web.config file:
Setting the configuration properties in that external file avoids restarting the application. If the configurations are put directly inside the Web.config file, then all changes will cause resetting the application.
FORCE THE BROWSER TO DOWNLOAD THE FILES
You can modify the
Generic Handler (.ashx file) to force the browser to download the files. More information on the subject can be found in the first link at the end of this article.
HOW TO USE THE FTP PROVIDER
The
used library for FTP connection does not provide "copy" feature. The implemented in the provider "copy" logic requires a Temp directory to be created, where a file will be cached and immediately deleted. This is necessary, because when the
FileCopy operation
is performed, the file is downloaded from the FTP server and then immediately uploaded to the new location in the Ftp server. In the currently implemented provider you need to set the
TempDirectoryPath configuration element to a valid virtual directory.
This is an example configuration file:
USEFUL LINKS
NOTE
In the earlier versions of the control the
CheckDeletePermissions and
CheckReadPermissions methods do not exist and need to be removed.