We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

UploadBox - how to send a custom statut code to OnComplete callback function ?

How to send a custom statut code (action controller) to OnComplete callback function ?
Moreover, how can I check file size prior uploading it (by property max file size) ?
Jacques Duclos

1 Reply

VR Varalakshmi R.S Syncfusion Team March 19, 2013 10:36 AM UTC

Hi Jacques Duclos,


Thanks for contacting Syncfusion forums.


Query 1:

You can send the custom status to controller by triggering ajax post on upload complete event. Please refer the below given code snippet,






        a =>

            a.SaveAction("Save", "Home")

            .RemoveAction("Remove", "Home")





function ClientSideOnComplete(sender, args) {

//Pass status as arguments in data


            type: "post",

            url: "Home/Index",

            data: { "args": "Custom Status" },

            dataType: 'html',

            success: function (data) {








        public ActionResult Index(string args)


//args hold the value sent from script

            return View();




Query 2:

The size of the file can be retrieved in the event “ClientSideOnSelect” from its argument “args[0].size”. please refer the below given code snippet,



function ClientSideOnSelect(sender, args) {




Note : To retrieve the file size in IE, you must enable the ActiveXcontrols using the below given option,

Tools->IE options-> Security->Trusted Sites->Custom level->Initialize and script ActiveX controls not marked as safefor scripting->Enable.


Kindly try the above solutions and let us know if this helps.




Live Chat Icon For mobile
Up arrow icon