mirror of
https://github.com/tenrok/axios.git
synced 2026-05-30 15:24:11 +03:00
Fixing overwrite Blob/File type as Content-Type in browser. (#1773)
Co-authored-by: Jay <jasonsaayman@gmail.com>
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user