This is a migrated thread and some comments may be shown as answers.

Setting ViewPaths to Server (or Absolute) Paths

1 Answer 56 Views
Editor
This is a migrated thread and some comments may be shown as answers.
Joshua
Top achievements
Rank 1
Joshua asked on 01 Feb 2009, 09:00 PM
My web app hosts files for individual uses in separate paths on the server.  These paths are not in the web app's subdirectory; they're located on attached storage via drive letters.  Is there anyway to set the ViewPaths to these directories?

When I do so as expressed in the online examples, I, of course, get an invalid virtual path exception.

Any pointers, or is this not possible?

Thanks,
Joshua

1 Answer, 1 is accepted

Sort by
0
Rumen
Telerik team
answered on 04 Feb 2009, 01:09 PM
Hi Joshua,

Please, review the following KB article on the subject: Uploading images and files to a Shared Drive.

Another approach is to implement your custom file system content provider that will be able to read the files for physical resources or virtual folders outside of the web application:

public class MyContentProvider : Telerik.WebControls.RadEditorUtils.FileSystemContentProvider
 {
        public MyContentProvider(HttpContext context, string[] searchPatterns, string[] viewPaths, string[] uploadPaths, string[] deletePaths, string selectedUrl, string selectedItemTag) : base(context, searchPatterns, viewPaths, uploadPaths, deletePaths, selectedUrl, selectedItemTag)
        {
        }

        public override string StoreFile(HttpPostedFile file, string path, string name, params string[] arguments)
        {
           
        }
    }

    private void Page_Load(object sender, System.EventArgs e)
    {
        RadEditor1.FileBrowserContentProviderTypeName = typeof(MyContentProvider).AssemblyQualifiedName;
    }


Regards,
Rumen
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
Editor
Asked by
Joshua
Top achievements
Rank 1
Answers by
Rumen
Telerik team
Share this question
or