From ffafe0e346e236eb14939b4ed13d3f9acefe5455 Mon Sep 17 00:00:00 2001 From: SadhulaSaiKumar Date: Mon, 8 Jan 2024 10:22:59 +0000 Subject: [PATCH] Delete 'readme.md' --- readme.md | 48 ------------------------------------------------ 1 file changed, 48 deletions(-) delete mode 100644 readme.md diff --git a/readme.md b/readme.md deleted file mode 100644 index f497b7c..0000000 --- a/readme.md +++ /dev/null @@ -1,48 +0,0 @@ - A sample of input data can be generate from below code for invoice,resume,Businesscard,Attendence. - - - -import base64 -import json -empty=[] - -found="file_path" -name = found -image = open(name, 'rb') -image_read = image.read() -image_64_encode = base64.b64encode(image_read) -NULL = 'null' -empty.append("ByteData--" + (NULL).strip('""')) -image_64_encode = image_64_encode.decode('utf-8') -empty.append("FileData--" + str(image_64_encode)) -imagedata = name.split("\\") -imagename = str(imagedata[-1]).replace('"', '').replace("[", "").replace("]", "") -imagename1 = str(imagename).split('.') - -imagename = str(imagename1[-2]).replace("[", "]") -empty.append("FileName--" + imagename) -empty.append("FilePath--" + found) -imageExtension = str(imagename1[-1]).replace("[", "]") -empty.append("FileType--" + imageExtension) - -import pandas as pd -df = pd.DataFrame(empty) -df = df[0].str.split("--", expand=True) -data1 = pd.DataFrame(df[0]) -data2 = pd.DataFrame(df[1]) -dt = data2.set_index(data1[0]) - -dt4 = dt.T - -dictionary = dt4.to_dict(orient="index") -dictionary[1] -payload1 = json.dumps(dictionary[1]) - -print(payload1) - -## note - - -when we have to test code using postman -after give url in body select json option then -add [] to the text generated from payload1 paste in the body and click send button \ No newline at end of file