Rank: Advanced Member Groups: Member
Joined: 3/18/2008 Posts: 41
|
Hi.
How can I show a user friendly error message when a user tries to upload a file with an extension that is not supported, or a file that is too large?
Thanks.
HT
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,193
|
Hi, You would handle the uploader's ClientSideOnError event. It will be something like this:
Code: HTML/ASPX
<eo:AJAXUploader ClientSideOnError="your_error_handler" ...>
....
</eo:AJAXUploader>
Code: JavaScript
function your_error_handler(control, error, message)
{
if (error == "extension_not_allowed")
{
//do something.....
}
}
You can find detailed information about this handler at here: http://www.essentialobjects.com/ViewDoc.aspx?t=JSDoc.Public.Handlers.clientside_error_handler.htmlThanks
|