feature-ner-keyword-detect #1

Merged
tigeren merged 35 commits from feature-ner-keyword-detect into main 2025-07-20 13:44:00 +00:00
1 changed files with 7 additions and 2 deletions
Showing only changes of commit 68765ab45f - Show all commits

View File

@ -89,10 +89,15 @@ async def download_file(
if not os.path.exists(file.processed_path): if not os.path.exists(file.processed_path):
raise HTTPException(status_code=404, detail="Processed file not found") raise HTTPException(status_code=404, detail="Processed file not found")
# Get the original filename without extension and add .md extension
original_filename = file.filename
filename_without_ext = os.path.splitext(original_filename)[0]
download_filename = f"{filename_without_ext}.md"
return FileResponse( return FileResponse(
path=file.processed_path, path=file.processed_path,
filename=file.filename, filename=download_filename,
media_type="application/octet-stream" media_type="text/markdown"
) )
@router.websocket("/ws/status/{file_id}") @router.websocket("/ws/status/{file_id}")