const formData = new FormData(); formData.append("file", { uri: imageUri, name: stdAdmNo.replaceAll("/", ""), fileName: stdAdmNo.replaceAll("/", ""), type: "image/jpg", }); console.log("image detail", formData); let url = url; try { axios({ method: "post", url: url, data: formData, headers: { "Content-Type": "multipart/form-data", }, }) .then(() => { Alert.alert("Profile picture is successfully saved."); }) .catch((error) => { console.log(error); }); } catch (e) { console.log(e); }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)