mirror of
https://github.com/langgenius/dify.git
synced 2024-11-16 11:42:29 +08:00
chore: save uploaded file extension as lower case (#10111)
This commit is contained in:
parent
8b9fed75f3
commit
e36f5cb366
|
@ -35,7 +35,7 @@ class FileService:
|
|||
filename = file.filename
|
||||
if not filename:
|
||||
raise FileNotExistsError
|
||||
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