Local File Provider Notes
The following guide shows the steps to config local file provider in RichTextEditor.
1. Add Provider code to project
Copy LocalFileProvider.cs file to your application App_Code folder.
2. Set a physical path on the server for LocalFileProvider
Edit the PhysicalFolder property in LocalFileProvider.cs.
static public string PhysicalFolder
{
get
{
return "d:\\myfolder";
}
}
{
get
{
return "d:\\myfolder";
}
}
3. Set FileProviderType of RichTextEditor and copy download.ashx to your application
Copy LocalFileProvider/download.ashx to your website folder, you can rename it.
Use SetSecurity method to set the FileProviderType.
Editor1.SetSecurity("*", "*", "FileProviderType", typeof(LocalFileProvider).AssemblyQualifiedName);
Editor1.SetSecurity("*", "*", "StoragePath", "/");
Editor1.SetSecurity("*", "*", "FileProviderArg0", "download.ashx?file=");
Editor1.SetSecurity("*", "*", "StoragePath", "/");
Editor1.SetSecurity("*", "*", "FileProviderArg0", "download.ashx?file=");