error

Triggered when an error occurs while files are being uploaded or removed.

The event object receives the following additional properties:

  • files - a list of File objects in the current selection operation. Each file contains:
    • name - the name of the file
    • size - the size of the file in bytes
    • type - the file's MIME type
  • operation - the operation that failed - "upload" or "remove"
  • listItem - the <LI> element displaying the item
  • responseText - the error string
  • status - the status of the operation. Available for "upload" operations in non-iframe mode only.
  • jqXHR - the jQuery XMLHTTPRequest object, available for "remove" operations only
<input type="file" name="files" id="files" />

<script type="text/javascript">
    jQuery(function ($) {
        $('#files').shieldUpload({
            events: {
                error: function(e) {
                    console.log("Error occurred with file " + e.operation);
                }
            }
        });
    });
</script>