diff --git a/lib/adapters/xhr.js b/lib/adapters/xhr.js index 5db1d1ef63..f83f1444bc 100644 --- a/lib/adapters/xhr.js +++ b/lib/adapters/xhr.js @@ -18,6 +18,13 @@ module.exports = function xhrAdapter(config) { delete requestHeaders['Content-Type']; // Let the browser set it } + if ( + (utils.isBlob(requestData) || utils.isFile(requestData)) && + requestData.type + ) { + delete requestHeaders['Content-Type']; // Let the browser set it + } + var request = new XMLHttpRequest(); // HTTP basic authentication