mirror of
https://github.com/Monadical-SAS/reflector.git
synced 2025-12-21 20:59:05 +00:00
server: add support for HEAD route on audio mp3
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import os
|
||||
from typing import BinaryIO
|
||||
|
||||
from fastapi import HTTPException, Request, status
|
||||
from fastapi import HTTPException, Request, Response, status
|
||||
from fastapi.responses import StreamingResponse
|
||||
|
||||
|
||||
@@ -57,6 +57,9 @@ def range_requests_response(
|
||||
),
|
||||
}
|
||||
|
||||
if request.method == "HEAD":
|
||||
return Response(headers=headers)
|
||||
|
||||
if content_disposition:
|
||||
headers["Content-Disposition"] = content_disposition
|
||||
|
||||
|
||||
@@ -210,6 +210,7 @@ async def transcript_delete(
|
||||
|
||||
|
||||
@router.get("/transcripts/{transcript_id}/audio/mp3")
|
||||
@router.head("/transcripts/{transcript_id}/audio/mp3")
|
||||
async def transcript_get_audio_mp3(
|
||||
request: Request,
|
||||
transcript_id: str,
|
||||
|
||||
Reference in New Issue
Block a user