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("somethi开发者_如何学Cng is wrong etc")
.
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
.
精彩评论