Skip to content

Commit

Permalink
👀 preview auto-delete fix
Browse files Browse the repository at this point in the history
  • Loading branch information
jiisanda committed Dec 10, 2023
1 parent 9094c7f commit dd6752f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion db/repositories/documents/documents.py
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ async def preview(self, document: Dict[str, Any]) -> FileResponse:
raise ValueError("Unsupported file type.")

# Creating a temp file
with tempfile.NamedTemporaryFile(delete=False, suffix=extension) as temp:
with tempfile.NamedTemporaryFile(delete=True, suffix=extension) as temp:
temp.write(file)
temp_path = temp.name

Expand Down

0 comments on commit dd6752f

Please sign in to comment.