Hi. im debuggin an APP in Chrome and all is working nice, but when i compile and i test the app, sometimes the fetch is sending the body empty and others the body its ok… in the body there are a base64 string, an image, i dont know if Android have any limitation with this… i have tried with 2 devices.
const cameraPhoto = await getPhoto({
resultType: CameraResultType.Uri,
source: CameraSource.Camera,
quality: 100
});
const base64 = await base64FromPath(cameraPhoto.webPath!);
//Subo foto al W.S.
const datos = { imagenBase64: base64, bastidor: "el basti" };
const miInit = { method: 'POST',
body:JSON.stringify(datos),
headers:{'Content-Type': 'application/json', "Authorization": `Bearer ${token}` } ,
};
var response= await fetch(process.env.REACT_APP_URLAPI+APISMARTCARSUBEFOTO,miInit).then(res => res.json())
.catch(error => MuestraAlert(error, TipoAlert.error))
.then(response => MuestraAlert("BIEN", TipoAlert.informacion));