From 813ee7d8526f8620a2f8778ef3f2e8d64a79b867 Mon Sep 17 00:00:00 2001 From: Adithya Ajith <4adhi007@gmail.com> Date: Sat, 3 Dec 2022 18:30:17 +0530 Subject: [PATCH] user detail --- src/components/Editprofileform/Editprofileform.js | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/src/components/Editprofileform/Editprofileform.js b/src/components/Editprofileform/Editprofileform.js index ae64aa8..15d0768 100644 --- a/src/components/Editprofileform/Editprofileform.js +++ b/src/components/Editprofileform/Editprofileform.js @@ -13,13 +13,20 @@ function Editprofileform() { const handleSubmit=(e)=>{ + + const uploaddata=new FormData() + // uploaddata.append('actual_name',actualname) + uploaddata.append('userimg',userimg) + axiosInstance.post(`${baseUrl}/user-detail/`,{ "actual_name":actualname, "phno":phno, - "user_image":userimg, + "user_image":uploaddata.userimg, "user_foreign":localStorage.getItem('userid') + }).then((response)=>{ +console.log(response) }) e.preventDefault(); @@ -46,14 +53,14 @@ function Editprofileform() { type="file" placeholder="pic" name="name" - value={userimg} - onChange = { (e) => setUserimg(e.target.value)} + accept='.jpg, .jpeg, .png' + onChange = { (e) => setUserimg(e.target.files[0])} />
-
Linkedin
+
Phone number