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 <happel@europe.altair.com> Co-authored-by: Jay <jasonsaayman@gmail.com> Co-authored-by: Dmitriy Mozgovoy <robotshara@gmail.com>
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

Lines changed: 1 addition & 1 deletion
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)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy