From 6aaa260e3874601364e003d2a1073537a3805924 Mon Sep 17 00:00:00 2001 From: pierre Date: Thu, 26 Jan 2023 18:32:37 +0100 Subject: [PATCH] Add headers['content-type'] // this is required to support formData on android --- polyfill/Fetch.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/polyfill/Fetch.js b/polyfill/Fetch.js index 5b164ee86..e2702d3e8 100644 --- a/polyfill/Fetch.js +++ b/polyfill/Fetch.js @@ -40,7 +40,10 @@ class ReactNativeBlobUtilFetchPolyfill { log.verbose('convert FormData to blob body'); promise = Blob.build(body).then((b) => { blobCache = b; - options.headers['Content-Type'] = 'multipart/form-data;boundary=' + b.multipartBoundary; + + const contentType = 'multipart/form-data;boundary=' + b.multipartBoundary + options.headers['Content-Type'] = contentType; + options.headers['content-type'] = contentType; return Promise.resolve(URIUtil.wrap(b._ref)); }); }