This commit is contained in:
parent
a1989520d4
commit
d46cff8857
1 changed files with 3 additions and 3 deletions
|
|
@ -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)
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue