uploadXhrError
Since: Editor 1.6
File upload received an error response from the server.
Please note - this property requires the Editor extension for DataTables.
Description
This event is triggered when a file upload (upload and uploadMany) has resulted in an error being returned by the server. This could an an authentication error, disk space or anything else. The event provides the ability to handle that error as best suits your business logic.
Type
function( e, fieldName, xhr )
Parameters:
| Name | Type | Optional | |
|---|---|---|---|
| 1 | e | No | |
Event object | |||
| 2 | fieldName | No | |
The field name that triggered the upload ( | |||
| 3 | xhr | No | |
jQuery XHR object. | |||
Example
Detect an error from a file upload:
editor.on('uploadXhrError', function (e, xhr) {
// An error has occurred during upload - log it
// ...
});Related
The following options are directly related and may also be useful in your application development.