mirror of
https://github.com/langgenius/dify.git
synced 2024-11-16 03:32:23 +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
|
filename = file.filename
|
||||||
if not filename:
|
if not filename:
|
||||||
raise FileNotExistsError
|
raise FileNotExistsError
|
||||||
extension = filename.split(".")[-1]
|
extension = filename.split(".")[-1].lower()
|
||||||
if len(filename) > 200:
|
if len(filename) > 200:
|
||||||
filename = filename.split(".")[0][:200] + "." + extension
|
filename = filename.split(".")[0][:200] + "." + extension
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user