Having a issue with getting the RadFileExplorer work with the example provided in http://demos.telerik.com/aspnet-ajax/fileexplorer/examples/server-sideapi/dbfilebrowsercontentprovider/defaultcs.aspx Following is the code used in my aspx file <telerik:RadFileExplorer runat="server" ID="RadFileExplorer1" Width="750px" Height="500px"
OnClientItemSelected="OnClientItemSelected"
Skin="Sitefinity">
<Configuration ViewPaths="~/Root/Default/ViewPath" UploadPaths="~/Root/Default/UploadPath"
DeletePaths="~/Root/Default/DeletePath" />
</telerik:RadFileExplorer> I have the ViewPaths, UploadPaths and DeletePaths set up in my solution as in the attached file (fileupload.png). The table structure is modeled according to the Items table with the addition of column CreatedBy. Have the following record in the Items table ItemID:1 Name: Root ParentID: NULL MimeType: NULL IsDirectory: True Size: NULL Content: NULL upsize_ts: NULL CreatedBy: nmarker Question 1: With the above setup I am unable to upload documents, or create Directories. Check file screenshot2.png My requirement is every logged in user to my website will have their own file structure defined in the DB. Have modified DataServer.csprivate DataTable Data
{
... SqlDataAdapter adapter = new SqlDataAdapter("SELECT ItemID, [Name], ParentID, MimeType, IsDirectory, [Size]FROM rbItems where CreatedBy='" + clsUtility.getLoggedInUserName() + "' ORDER BY ItemID", Connection);
...
}public byte[] GetContent(string path)Question 2: Can all logged in users share the same physical folder structure? as in fileupload.png? or should each user have their own folder structure defined? Please advise.
{
.. SqlCommand command = new SqlCommand("SELECT Content FROM rbItems WHERE ItemID = @ItemID AND CreatedBy = @CreatedBy", Connection);
...
}
public void CreateItem(string name, string path, string mimeType, bool isDirectory, long size, byte[] content)
{
.. SqlCommand command =
new SqlCommand(
"INSERT INTO rbItems ([Name], ParentId, MimeType, IsDirectory, [Size], Content, CreatedBy) VALUES (@Name, @ParentId, @MimeType, @IsDirectory, @Size, @Content, @CreatedBy)", Connection);
...
command.Parameters.Add(new SqlParameter("@CreatedBy", clsUtility.getLoggedInUserName()));
... }