update
This commit is contained in:
@@ -104,7 +104,8 @@ def download_file(video_id: int, db: Session = Depends(get_db)):
|
||||
|
||||
path = Path(video.file_path)
|
||||
if not path.exists():
|
||||
raise HTTPException(status_code=404, detail="Videodatei nicht gefunden")
|
||||
video_service.update_file_path(db, video_id, None)
|
||||
raise HTTPException(status_code=404, detail="Video noch nicht heruntergeladen")
|
||||
|
||||
return FileResponse(path, media_type="video/mp4", filename=f"{video.title}.mp4")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user