SlickUpload
Welcome Guest Search | Active Topics | Log In | Register

Limit Upload by File Extensions Using Async Options
clashcity1974
#1 Posted : Monday, October 17, 2011 6:19:20 PM
Rank: Newbie

Groups: Registered

Joined: 7/8/2011
Posts: 4

Howdy -

I'm using the Slick sample for 6.1.1 and would like to limit uploads to image files only.

What is the easiest way to implement this?

I tried - using slickUpload.ValidExtensions as shown in the Validation example, but it seems that doesn't work for UploadConnectors.

Please advise.

Axosoft
#2 Posted : Tuesday, October 18, 2011 4:33:40 PM
Rank: Administration


Groups: Administrators

Joined: 7/7/2005
Posts: 1,586
Location: Scottsdale, AZ

This should work. Are you seeing an error? The ValidExtensions property will show the validation, but it won't actually keep the upload from happening at this point -- you'll need to add javascript to whatever validation framework you're using to do that. See the Validation sample for an example of doing this with the builtin ASP.NET validators.

Daljit
#3 Posted : Sunday, January 29, 2012 3:30:29 AM
Rank: Newbie

Groups: Registered

Joined: 1/29/2012
Posts: 1
Location: London

Actually I have the same problem; the property 'ValidExtensions' can be set in code behind (c#) for  <kw:SlickUpload Id="slickUpload" ...  but not for <kw:UploadConnector Id="slickUpload"... It simply doesn exist as a property where one cn set or change the value.

 

Why would I want do this ? Well, I'm trying to combine the 'slick' look with 'validation'. Solutions ? 

 

Axosoft
#4 Posted : Sunday, January 29, 2012 11:06:40 AM
Rank: Administration


Groups: Administrators

Joined: 7/7/2005
Posts: 1,586
Location: Scottsdale, AZ

The ValidExtensions property is actually part of the FileSelector control, not the UploadConnector control.

Users browsing this topic
Guest
Forum Jump  
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.