mirror of
https://github.com/tenrok/axios.git
synced 2026-05-15 11:59:42 +03:00
Co-authored-by: Hendrik Appel <happel@europe.altair.com> Co-authored-by: Jay <jasonsaayman@gmail.com> Co-authored-by: Dmitriy Mozgovoy <robotshara@gmail.com>
This commit is contained in:
@@ -314,7 +314,7 @@ export default isHttpAdapterSupported && function httpAdapter(config) {
|
|||||||
} catch (e) {
|
} catch (e) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else if (utils.isBlob(data)) {
|
} else if (utils.isBlob(data) || utils.isFile(data)) {
|
||||||
data.size && headers.setContentType(data.type || 'application/octet-stream');
|
data.size && headers.setContentType(data.type || 'application/octet-stream');
|
||||||
headers.setContentLength(data.size || 0);
|
headers.setContentLength(data.size || 0);
|
||||||
data = stream.Readable.from(readBlob(data));
|
data = stream.Readable.from(readBlob(data));
|
||||||
|
|||||||
Reference in New Issue
Block a user