Welcome Guest Search | Active Topics | Sign In | Register

AJAX Uploader - Allowed Extensions Options
ljubok
Posted: Wednesday, July 29, 2009 7:54:59 AM
Rank: Newbie
Groups: Member

Joined: 3/16/2009
Posts: 9
Hello,

Could you please post an example thats shows how to set Allowed Extensions of an uploader on a clinet side. I have some problems with setAllowedExtensions and getAllowedExtensions, but maybe I'm doing something wrong.

Thanks in advance!
eo_support
Posted: Wednesday, July 29, 2009 9:39:28 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,194
Hi,

Here is the sample code to set allowed extension to only allow ".bmp" and ".gif" file:

Code: JavaScript
//Get the uploader object
var uploader = eo_GetObject("uploader1");

//Change allowed extension
uploader.setAllowedExtension(".bmp|.gif");


Thanks!
ljubok
Posted: Wednesday, July 29, 2009 11:18:22 AM
Rank: Newbie
Groups: Member

Joined: 3/16/2009
Posts: 9
Thanks, it does the job!

Another quick question, it might save me some trouble.
Is it possible to display progress bar only after user clicks to submit the file, without using AJAXUploaderProgressDialog control? I like the default progress bar in LayoutTemplate, but the only problem with it is that it is displayed all the time.
eo_support
Posted: Wednesday, July 29, 2009 12:13:54 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,194


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.