Image Picker response in formData appending inside multiple array

cameraUpload = async() => {
let pickerResult = await ImagePicker.launchCameraAsync({
exif: true,
allowsEditing: true,
quality: 0.7,
base64: false,
aspect: [4, 3]
});
if (!pickerResult.cancelled) {
this.handleUploadPhoto(pickerResult)
}}

This is my handle Function
handleUploadPhoto(pickerResult){

let formData = new FormData();
cropInfo = {
width: 602,
height: 602
},
contentType = “type/jpeg”,
FileSystem.getInfoAsync(pickerResult.uri).then((info) => {
formData.append({ “uri”: info.uri })
console.log(formData)
})}

The response is appended inside the formData(), but it is appended inside arrays. My console response is below:
FormData {
“_parts”: Array [
Array [
Array [
“uri”:“responseURI”,
],
],
],}
Can anyone tell me why my response is being appended inside these arrays? Thanks in advance.

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.