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

RadFileExplorer file upload comformation

2 Answers 97 Views
Upload (Obsolete)
This is a migrated thread and some comments may be shown as answers.
Tarun Juneja
Top achievements
Rank 1
Tarun Juneja asked on 30 Jun 2010, 08:39 AM
Hi Guys,

I am using RadFileExplorer and want to display a confirmation message for all the duplicate files which already exists on the server.

How i can achieve this.

I am using custom DB file storage.

Below is my control declaration.........

 

<

 

telerik:RadFileExplorer ID="RadFileExplorer" Skin="Windows7" Configuration-MaxUploadFileSize="10485760" DisplayUpFolderItem="false" runat="server" OnClientFileOpen="OnClientFileOpen" OnClientItemSelected="OnClientItemSelected" OnItemCommand="RadFileExplorer_ItemCommand">

 

 

 <Configuration ViewPaths="~/Dummy" UploadPaths="~/Dummy" DeletePaths="~/Dummy" />

 

 

</telerik:RadFileExplorer>

or if someone can tell me any way by which i can display a confirmation message saying "some of your file were not uploaded".

Thank you

Tarun Juneja

 

 

 

 

 

 

2 Answers, 1 is accepted

Sort by
0
Fiko
Telerik team
answered on 05 Jul 2010, 07:16 AM
Hi Tarun,

In your case you can use one of these approaches:
  • The RadFileExplorer control has this feature built in. You just need to override the GetFile method inside the custom FileBrowserContentProvider control. This method is used internally by the RadFileExplorer control i norder to check whether a file already exists (on the Database server in your case). If the file exists, then a JavaScript message is shown to the client. You can change the text of the message by overriding the FileExists key's value in the RadEditor.Dialogs.resx file.
  • You can use the RadFileExplorer's OnItemCommand and manually check whether the file exists. Then you can directly show message to the client using ScriptManager.RegisterStartupScript method.
  • You can register JavaScript alert directly inside the FileBrowserContentProvider.StoreFile method. In this case you need to get reference to the page that hosts the RadFileExplorer control and pass this Page object to the ScriptManager.RegisterStartupScript method:
    Page _page = Context.CurrentHandler as Page;// get reference to the page
    string script = string.Format("alert('{0}');", "message text");// The JavaScript code
    ScriptManager.RegisterStartupScript(_page, _page.GetType(), "KEY", script, true);// Register the code
I hope this helps.

Kind regards,
Fiko
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Tarun Juneja
Top achievements
Rank 1
answered on 10 Aug 2010, 07:46 AM
Yes, This solves my issue.

Thank you
Tags
Upload (Obsolete)
Asked by
Tarun Juneja
Top achievements
Rank 1
Answers by
Fiko
Telerik team
Tarun Juneja
Top achievements
Rank 1
Share this question
or