fix: skip file format check of mime types for generated files by tools (#17455)
This commit is contained in:
parent
95212af935
commit
fcd5fcca83
1 changed files with 0 additions and 2 deletions
|
|
@ -253,8 +253,6 @@ def _build_from_tool_file(
|
||||||
extension = "." + tool_file.file_key.split(".")[-1] if "." in tool_file.file_key else ".bin"
|
extension = "." + tool_file.file_key.split(".")[-1] if "." in tool_file.file_key else ".bin"
|
||||||
|
|
||||||
file_type = _standardize_file_type(extension=extension, mime_type=tool_file.mimetype)
|
file_type = _standardize_file_type(extension=extension, mime_type=tool_file.mimetype)
|
||||||
if file_type.value != mapping.get("type", "custom"):
|
|
||||||
raise ValueError("Detected file type does not match the specified type. Please verify the file.")
|
|
||||||
|
|
||||||
return File(
|
return File(
|
||||||
id=mapping.get("id"),
|
id=mapping.get("id"),
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue