Spaces:
Paused
Paused
Update file_conversion.py
Browse files- file_conversion.py +1 -1
file_conversion.py
CHANGED
|
@@ -20,7 +20,7 @@ def remove_file(path: str):
|
|
| 20 |
logger.info(f"Removed temporary file: {path}")
|
| 21 |
|
| 22 |
@router.post("/convert/pdf_to_docx")
|
| 23 |
-
async def convert_pdf_to_docx(file: UploadFile = File(...)
|
| 24 |
if not file.filename.endswith('.pdf'):
|
| 25 |
raise HTTPException(status_code=400, detail="File must be a PDF")
|
| 26 |
|
|
|
|
| 20 |
logger.info(f"Removed temporary file: {path}")
|
| 21 |
|
| 22 |
@router.post("/convert/pdf_to_docx")
|
| 23 |
+
async def convert_pdf_to_docx(background_tasks: BackgroundTasks, file: UploadFile = File(...)):
|
| 24 |
if not file.filename.endswith('.pdf'):
|
| 25 |
raise HTTPException(status_code=400, detail="File must be a PDF")
|
| 26 |
|