diff options
Diffstat (limited to 'src/ajax/binary.js')
-rw-r--r-- | src/ajax/binary.js | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/ajax/binary.js b/src/ajax/binary.js index e96661da7..16f06d7e9 100644 --- a/src/ajax/binary.js +++ b/src/ajax/binary.js @@ -2,10 +2,13 @@ import jQuery from "../core.js"; import "../ajax.js"; -jQuery.ajaxPrefilter( function( s ) { +jQuery.ajaxPrefilter( function( s, origOptions ) { // Binary data needs to be passed to XHR as-is without stringification. - if ( typeof s.data !== "string" && !jQuery.isPlainObject( s.data ) ) { + if ( typeof s.data !== "string" && !jQuery.isPlainObject( s.data ) && + + // Don't disable data processing if explicitly set by the user. + !( "processData" in origOptions ) ) { s.processData = false; } |