mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-27 03:34:10 +00:00
fix - audio_transcriptions security fix
This commit is contained in:
parent
e52e4cc1a9
commit
5d39865362
1 changed files with 3 additions and 0 deletions
|
@ -4166,6 +4166,9 @@ async def audio_transcriptions(
|
||||||
file.filename is not None
|
file.filename is not None
|
||||||
) # make sure filename passed in (needed for type)
|
) # make sure filename passed in (needed for type)
|
||||||
|
|
||||||
|
# rename the file to a random hash file name -> we eventuall remove the file and don't want to remove any local files
|
||||||
|
file.filename = f"tmp-request" + str(uuid.uuid4())
|
||||||
|
|
||||||
with open(file.filename, "wb+") as f:
|
with open(file.filename, "wb+") as f:
|
||||||
f.write(await file.read())
|
f.write(await file.read())
|
||||||
try:
|
try:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue