Skip to content

Commit 8c2afb8

Browse files
committed
refac
1 parent ae0316a commit 8c2afb8

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

backend/open_webui/routers/files.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -207,8 +207,8 @@ def upload_file_handler(
207207
filename = os.path.basename(unsanitized_filename)
208208

209209
file_extension = os.path.splitext(filename)[1]
210-
# Remove the leading dot from the file extension
211-
file_extension = file_extension[1:] if file_extension else ''
210+
# Remove the leading dot from the file extension and lowercase it
211+
file_extension = file_extension[1:].lower() if file_extension else ''
212212

213213
if process and request.app.state.config.ALLOWED_FILE_EXTENSIONS:
214214
request.app.state.config.ALLOWED_FILE_EXTENSIONS = [

0 commit comments

Comments
 (0)