Welcome Guest Search | Active Topics | Sign In | Register

AJAXUploader excluded extensions Options
Mike Wynn
Posted: Friday, April 8, 2011 10:20:33 AM
Rank: Advanced Member
Groups: Member

Joined: 8/24/2007
Posts: 130
Hi,

I am using the AJAX uploader, and have a requirement to be able to exclude certain file extensions from being uploaded. I realise that we don't have an ExcludedExtensions property, but is there any way of achieving this using javascript?

I thought about handling the onStart event. I could inspect the current file using getCurrentFileName, and then call cancel if the extension is excluded. The problem is that calls to getCurrentFileName always seem to come back with 'undefined'. Any ideas?

Regards
eo_support
Posted: Friday, April 8, 2011 10:25:48 AM
Rank: Administration
Groups: Administration

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

You will only see the current file name once the upload is in progress. So you have to let the uploading to start first. Once it is started, you can handle the uploader's ClientSideOnProgress event and if you see the wrong extension, you can cancel the upload. This is not a perfectly clean solution but that is the closest you can get.

Thanks!
Mike Wynn
Posted: Friday, April 8, 2011 10:33:16 AM
Rank: Advanced Member
Groups: Member

Joined: 8/24/2007
Posts: 130
Thanks, I will give that a try.
Mike Wynn
Posted: Friday, April 8, 2011 10:39:55 AM
Rank: Advanced Member
Groups: Member

Joined: 8/24/2007
Posts: 130
Hi,

I can't seem to get this to work. getCurrentFileName seems to return null until the file has uploaded.
eo_support
Posted: Friday, April 8, 2011 5:18:16 PM
Rank: Administration
Groups: Administration

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

That would be interesting. We will look into it and get back to you.

Thanks!


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.