question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

RNFetchBlob.fetch PUT, multipart/formdata doesn't work on android

See original GitHub issue

Installed version: version “0.10.8” resolved “https://registry.yarnpkg.com/react-native-fetch-blob/-/react-native-fetch-blob-0.10.8.tgz#4fc256abae0cb5f10e7c41f28c11b3ff330d72a9

Sending PUT request with multipart/formdata sends empty body on android.

Issue Analytics

  • State:open
  • Created 5 years ago
  • Comments:7

github_iconTop GitHub Comments

2reactions
sasha-nechaievcommented, Mar 20, 2019

I’ve debugged java and found that using nmultipart/formdata if type is not specified for some field here https://github.com/joltup/rn-fetch-blob/blob/d8c79f6b261e7bd76b477f2b304379b1dbeb8836/android/src/main/java/com/RNFetchBlob/RNFetchBlobBody.java#L397 it wants to convert it to string. To solve your issue make sure that you specified “type” for each non-string field or set them to string type. @kanekv

0reactions
thuantvDr4commented, Jun 6, 2021

I’ve debugged java and found that using nmultipart/formdata if type is not specified for some field here

https://github.com/joltup/rn-fetch-blob/blob/d8c79f6b261e7bd76b477f2b304379b1dbeb8836/android/src/main/java/com/RNFetchBlob/RNFetchBlobBody.java#L397

it wants to convert it to string. To solve your issue make sure that you specified “type” for each non-string field or set them to string type. @kanekv

Yes thank, my issue is resolved!

Read more comments on GitHub >

github_iconTop Results From Across the Web

React Native Fetch Blob multipart data image upload not ...
I am trying to work out how to upload multiple images with RNFetchBlob. I'm using a base64 encoded version of an image as...
Read more >
rn-fetch-blob-v2 - npm
Start using rn-fetch-blob-v2 in your project by running `npm i ... Multipart/form-data example: Post form data with file and data.
Read more >
Fetching and Using Blob Data in React Native: Demystified
In this post, we'll explore how to fetch and handle blob data in React Native applications properly.
Read more >
Store Video and buffer from there[solved] - Questions - Prisma 1
or can you give me an example of a video upload with RN-fetch-Blob as ... I'm not quite sure how RNFetchBlob affects the...
Read more >
request failed with status code 400 axios react native - You.com
https://github.com/joltup/rn-fetch-blob#multipartform-data-example-post-form-data ... I am testing in android emulator and ios simulator, it doesn't work in ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found