From c920c35a9cbc3f53d197e54da8823879cd7c1891 Mon Sep 17 00:00:00 2001 From: Chief Bube Date: Mon, 6 Nov 2023 06:15:12 -0800 Subject: [PATCH] image now works --- src/components/Settings/Tabs/PersonalInfoTab.jsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/components/Settings/Tabs/PersonalInfoTab.jsx b/src/components/Settings/Tabs/PersonalInfoTab.jsx index 9d5dafa..002ae67 100644 --- a/src/components/Settings/Tabs/PersonalInfoTab.jsx +++ b/src/components/Settings/Tabs/PersonalInfoTab.jsx @@ -137,15 +137,17 @@ export default function PersonalInfoTab({ if (e.target.value !== "") { const imgReader = new FileReader(); imgReader.onload = (event) => { + let base64Img = imgReader.result.split(",")[1]; let reqData = { // PAYLOAD FOR API CALL file_name: uploadedFile?.name, file_size: uploadedFile?.size, file_type: uploadedFile?.type?.split("/")[0]?.toLowerCase(), - file_data: event?.target?.result, + file_data: base64Img, msg_type: "FILE", action: 11300, }; + setUploadStatus({ loading: true, status: false,