fix: octet/stream => application/octet-stream (#15329)
Co-authored-by: crazywoola <427733928@qq.com>
This commit is contained in:
parent
87efd4ab84
commit
aef43910b1
6 changed files with 9 additions and 7 deletions
|
|
@ -101,7 +101,7 @@ class ToolFileManager:
|
|||
except httpx.TimeoutException:
|
||||
raise ValueError(f"timeout when downloading file from {file_url}")
|
||||
|
||||
mimetype = guess_type(file_url)[0] or "octet/stream"
|
||||
mimetype = guess_type(file_url)[0] or "application/octet-stream"
|
||||
extension = guess_extension(mimetype) or ".bin"
|
||||
unique_name = uuid4().hex
|
||||
filename = f"{unique_name}{extension}"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue