Search code examples
.netplupload

Plupload in .NET - raising an error in the Plupload control


I have an event handler for when an error is raised in Plupload:

Error: function(up, args) {
  // do something
}

How do I RAISE an error elsewhere in the code? I want to say up.RaiseError("something is wrong etc").


Solution

  • you can manually trigger the error event:

    up.trigger('Error', args);
    

    where args can basically be anything you want. For consistency, args should be an object with 2 required keys code and message, and 2 optional keys file and status.