3 Answers, 1 is accepted
0
Accepted
Hello Anthony,
Yes, you need to set a custom FileBrowserContentProvider and override the StoreFile method. In this method you can get the MIME type of the uploaded file. For your convenience I have attached a demo showing how this can be implemented.
I hope this helps.
Kind regards,
Fiko
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Yes, you need to set a custom FileBrowserContentProvider and override the StoreFile method. In this method you can get the MIME type of the uploaded file. For your convenience I have attached a demo showing how this can be implemented.
I hope this helps.
Kind regards,
Fiko
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Ram Adduri
Top achievements
Rank 1
answered on 27 Mar 2010, 03:07 PM
I saw your demo application. its nice and working fine but only problem is it should show a message once he tried to upload file. is there any way to show that message also one more help i need that is there any way that i need to open olny specified extension files.
Thansk,
Ram
Thansk,
Ram
0
Hi Ram,
In order to pop-up a message from the code behind you need to register client script to the page using the approach given in the following KB article:
Calling radalert from codebehind (all versions of RadWindow)
Regarding the opened files, RadFileExplorer fires a client event OnClientFileOpen and you can use the following approach to check the file extension:
I hope this helps.
Sincerely yours,
Dobromir
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.
In order to pop-up a message from the code behind you need to register client script to the page using the approach given in the following KB article:
Calling radalert from codebehind (all versions of RadWindow)
Regarding the opened files, RadFileExplorer fires a client event OnClientFileOpen and you can use the following approach to check the file extension:
<
telerik:RadFileExplorer
ID
=
"RadFileExplorer1"
runat
=
"server"
OnClientFileOpen
=
"OnClientFileOpen"
EnableOpenFile
=
"true"
>
<
Configuration
ViewPaths
=
"~/"
/>
</
telerik:RadFileExplorer
>
<
script
type
=
"text/javascript"
>
function OnClientFileOpen(sender, args)
{
var item = args.get_item();
if (item.get_extension())
alert("The selected item's extension is: " + item.get_extension());
else
alert("The selected item is a folder");
//cancles the event
args.set_cancel(true);
}
</
script
>
I hope this helps.
Sincerely yours,
Dobromir
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.