mirror of https://github.com/langgenius/dify.git
fix: ensure file extension validation is case-insensitive
This commit is contained in:
parent
56fd571acc
commit
4b1af0d525
|
|
@ -488,7 +488,7 @@ def _is_file_valid_with_config(
|
|||
if (
|
||||
input_file_type == FileType.CUSTOM
|
||||
and config.allowed_file_extensions is not None
|
||||
and file_extension not in config.allowed_file_extensions
|
||||
and file_extension.lower() not in {ext.lower() for ext in config.allowed_file_extensions}
|
||||
):
|
||||
return False
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue