Welcome Guest Search | Active Topics | Sign In | Register

Change MaxDataSize Message Options
alberto
Posted: Thursday, June 11, 2009 8:26:57 AM
Rank: Newbie
Groups: Member

Joined: 10/1/2008
Posts: 1
I need to change the message of error when a user uploads a file with Size older than MaxSizeData.

How I change the error message?
eo_support
Posted: Thursday, June 11, 2009 8:37:37 AM
Rank: Administration
Groups: Administration

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

You will need to handle the uploader's ClientSideOnError event. It will be something like this:

Code: HTML/ASPX
<eo:AJAXUploader ClientSideOnError="error_handler" ....>
....
</eo:AJAXUploader>


Where error_handler is a JavaScript function you would implement in your page. An example:

Code: JavaScript
function error_handler(uploader, error, message)
{
    if (error == "max_size_exceeded")
        alert("file is too big!");
    else
        .....
}


See here for a list of possible "error" values:

http://doc.essentialobjects.com/library/1/jsdoc.public.handlers.clientside_error_handler.aspx

Please feel free to let us know if you have any more questions.

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.