upload

Fired just before all pending files are to be uploaded.

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

This event can be cancelled.

<input type="file" name="files" id="files" />

<script type="text/javascript">
    jQuery(function ($) {
        $('#files').shieldUpload({
            events: {
                upload: function(e) {
                    // handle event ...
                }
            }
        });
    });
</script>