I'm struggled with react native file upload using Axios form data. I set the content type as multipart/form-data. below is my request parts.
- form-data body content
{"_parts":[["profileImage",{"name":"rn_image_picker_lib_temp_51ee6068-2b4b-4baf-a6c3-44b14b0b5b9b.jpg","type":"image/jpeg","uri":"file:///data/user/0/com.sentura.xchange/cache/rn_image_picker_lib_temp_51ee6068-2b4b-4baf-a6c3-44b14b0b5b9b.jpg"}],["email","xx@gmail.com"],["firstName","vv"],["lastName","ss"],["address","sdf"],["postalCode","2323"],["mobileNumber","0796677653"],["country","Anguilla"],["countryCode","+1264"]]}"
- request headers
"headers":{ "Accept":"application/json", "Authorization":"Bearer eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJ2aWR1OTk2QGdtYWlsLmNvbSIsImV4cCI6MTY0NTk1ODYzNywiaWF0IjoxNjQ1OTU3NzM3fQ.GZMQFYGU4veH4xZ9ki2afWmtbGCKhOK5JruWLRX75nisVXXX9JmQYf31ns_ALVr9N1-RgcpMabolgHQSMZ7KIw", "Content-Type":"multipart/form-data" }
but from the spring boot side, it gives the below error. but this work in postman.
org.apache.tomcat.util.http.fileupload.FileUploadException: the request was rejected because no multipart boundary was found
Hope your support to resolve this. thanks!