I'm trying to upload an image from my app to API, but it didn't responded by the server, but another data which is text is sent successfully, can anyone help me?
Response from the image picker
{"fileName": "rn_image_picker_lib_temp_62670a6c-c6a8-47a6-ae8f-2696455d141b.jpg", "fileSize": 82214, "height": 800, "type": "image/jpeg", "uri": "content://com.talikasih.imagepickerprovider/cacheDir/rn_image_picker_lib_temp_62670a6c-c6a8-47a6-ae8f-2696455d141b.jpg", "width": 379}
and this is the data
const datas = new FormData();
datas.append('images', payload.image)
Here is the axios
axios({
method: 'POST',
url: API_NO_PARAM_CONFIG.createCampaign,
headers: {
Authorization: `Bearer ${e}`,
},
data: {
datas,
},
})