WordPress.org

Make WordPress Core

Ticket #19001: 19001.patch

File 19001.patch, 778 bytes (added by kurtpayne, 2 years ago)

Show error message when upload size exceeds max upload limit

  • wp-includes/js/plupload/handlers.dev.js

     
    2424        jQuery('#cancel-upload').prop('disabled', false); 
    2525} 
    2626 
     27// see if the file is in the queue 
     28function fileIsQueued(fileObj) { 
     29        return 1 == jQuery('#media-item-' + fileObj.id ,jQuery('#media-items')).length; 
     30} 
     31 
    2732function uploadStart(fileObj) { 
    2833        try { 
    2934                if ( typeof topWin.tb_remove != 'undefined' ) 
     
    435440                }); 
    436441 
    437442                uploader.bind('Error', function(up, err) { 
     443                        if ( !fileIsQueued(err.file) ) 
     444                                fileQueued(err.file); 
    438445                        uploadError(err.file, err.code, err.message); 
    439446 
    440447                        up.refresh();