Changeset 46506
- Timestamp:
- 10/14/2019 07:54:36 PM (6 years ago)
- Location:
- trunk/src/js/_enqueues/vendor/plupload
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/js/_enqueues/vendor/plupload/handlers.js
r46382 r46506 428 428 429 429 // Attempt to create image sub-sizes when an image was uploaded successfully 430 // but the server responded with HTTP 500error.430 // but the server responded with an HTTP 500 or 502 error. 431 431 tryAgain = function( up, error ) { 432 432 var file = error.file; … … 466 466 }); 467 467 468 if ( error.message && error.status !== 500 ) {468 if ( error.message && error.status !== 500 && error.status !== 502 ) { 469 469 wpQueueError( error.message ); 470 470 } else { … … 506 506 }).fail( function( jqXHR ) { 507 507 // If another HTTP 500 error, try try again... 508 if ( jqXHR.status === 500 ) {508 if ( jqXHR.status === 500 || jqXHR.status === 502 ) { 509 509 tryAgain( up, error ); 510 510 return; … … 583 583 var status = error && error.status; 584 584 585 // If the file is an image and the error is HTTP 500 try to create sub-sizes again.586 if ( status === 500&& isImage ) {585 // If the file is an image and the error is HTTP 500 or 502 try to create sub-sizes again. 586 if ( ( status === 500 || status === 502 ) && isImage ) { 587 587 tryAgain( up, error ); 588 588 return; -
trunk/src/js/_enqueues/vendor/plupload/wp-plupload.js
r46382 r46506 110 110 /** 111 111 * Attempt to create image sub-sizes when an image was uploaded successfully 112 * but the server responded with HTTP 500 error.112 * but the server responded with HTTP 500 or 502 error. 113 113 * 114 114 * @since 5.3.0 … … 185 185 } 186 186 }).fail( function( jqXHR ) { 187 // If another HTTP 500 error, try try again...188 if ( jqXHR.status === 500 ) {187 // If another HTTP 500 or 502 error, try try again... 188 if ( jqXHR.status === 500 || jqXHR.status === 502 ) { 189 189 tryAgain( message, data, file ); 190 190 return; … … 210 210 var status = data && data.status; 211 211 212 // If the file is an image and the error is HTTP 500 try to create sub-sizes again.213 if ( retry !== 'no-retry' && status === 500 && isImage) {212 // If the file is an image and the error is HTTP 500 or 502 try to create sub-sizes again. 213 if ( retry !== 'no-retry' && isImage && ( status === 500 || status === 502 ) ) { 214 214 tryAgain( message, data, file ); 215 215 return;
Note: See TracChangeset
for help on using the changeset viewer.