Skip to content

Commit 6841d8d

Browse files
hencoappelHendrik AppeljasonsaaymanDigitalBrainJS
authored
fix(http): add support for File objects as payload in http adapter (#6588) (#6605)
Co-authored-by: Hendrik Appel <[email protected]> Co-authored-by: Jay <[email protected]> Co-authored-by: Dmitriy Mozgovoy <[email protected]>
1 parent 17cab9c commit 6841d8d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/adapters/http.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -314,7 +314,7 @@ export default isHttpAdapterSupported && function httpAdapter(config) {
314314
} catch (e) {
315315
}
316316
}
317-
} else if (utils.isBlob(data)) {
317+
} else if (utils.isBlob(data) || utils.isFile(data)) {
318318
data.size && headers.setContentType(data.type || 'application/octet-stream');
319319
headers.setContentLength(data.size || 0);
320320
data = stream.Readable.from(readBlob(data));

0 commit comments

Comments
 (0)