Feat/2070 glm 4 and glm 3 turbo (#2114)
This commit is contained in:
parent
e19ad023d2
commit
8438d820ad
6 changed files with 92 additions and 6 deletions
|
|
@ -9,8 +9,8 @@ from typing import Optional
|
|||
from extensions.ext_storage import storage
|
||||
from flask import current_app
|
||||
|
||||
SUPPORT_EXTENSIONS = ['jpg', 'jpeg', 'png', 'webp', 'gif', 'svg']
|
||||
|
||||
IMAGE_EXTENSIONS = ['jpg', 'jpeg', 'png', 'webp', 'gif', 'svg']
|
||||
IMAGE_EXTENSIONS.extend([ext.upper() for ext in IMAGE_EXTENSIONS])
|
||||
|
||||
class UploadFileParser:
|
||||
@classmethod
|
||||
|
|
@ -18,7 +18,7 @@ class UploadFileParser:
|
|||
if not upload_file:
|
||||
return None
|
||||
|
||||
if upload_file.extension not in SUPPORT_EXTENSIONS:
|
||||
if upload_file.extension not in IMAGE_EXTENSIONS:
|
||||
return None
|
||||
|
||||
if current_app.config['MULTIMODAL_SEND_IMAGE_FORMAT'] == 'url' or force_url:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue