onError
function
N/A
Triggered when an error occurs either adding a file to the queue or uploading a file.
Arguments
- errorType
One of several types of error codes including: QUEUE_LIMIT_EXCEEDED, UPLOAD_LIMIT_EXCEEDED, FILE_SIZE_LIMIT_EXCEEDED, FORBIDDEN_FILE_TYPE, and 404_FILE_NOT_FOUND - file / filesToUpload
Depending on the error code, the second argument will hold either a null value, the file object being uploaded (FILE_SIZE_LIMIT_EXCEEDED, FORBIDDEN_FILE_TYPE, 404_FILE_NOT_FOUND) or a collection of files that need to be uploaded (UPLOAD_LIMIT_EXCEEDED).
Demo
1 |
<input type="file" name="file_upload" id="file_upload" /> |
1 2 3 4 5 6 7 8 |
$(function() { $('#file_upload').uploadifive({ 'uploadScript' : '/uploadifive.php' 'onError' : function(errorType) { alert('The error was: ' + errorType); } }); }); |