This commit is contained in:
Vijay Soni 2024-12-23 01:13:56 +05:30
parent a1989520d4
commit d46cff8857

View file

@ -19,9 +19,9 @@ async def convert(file: UploadFile = File(...)):
markitdown = MarkItDown()
result = markitdown.convert(temp_file_path)
output_file_path = f"/tmp/{os.path.splitext(file.filename)[0]}.md"
with open(output_file_path, "w") as output_file:
output_file.write(result.text_content)
# output_file_path = f"/tmp/{os.path.splitext(file.filename)[0]}.md"
# with open(output_file_path, "w") as output_file:
# output_file.write(result.text_content)
os.remove(temp_file_path)