mirror of
https://github.com/langgenius/dify.git
synced 2024-11-16 19:59:50 +08:00
fix(file_service): normalize file extension to lowercase
This commit is contained in:
parent
3823d959fd
commit
1d1e51a057
|
@ -38,7 +38,7 @@ class FileService:
|
|||
source_url: str = "",
|
||||
) -> UploadFile:
|
||||
# get file extension
|
||||
extension = filename.split(".")[-1]
|
||||
extension = filename.split(".")[-1].lower()
|
||||
if len(filename) > 200:
|
||||
filename = filename.split(".")[0][:200] + "." + extension
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user