mirror of
https://gh-proxy.org/https://github.com/klinsmaya/SQLBot.git
synced 2026-11-08 17:26:55 +08:00
fix: remove svg image support in upload files
This commit is contained in:
@@ -130,7 +130,7 @@ async def ui(session: SessionDep, data: str = Form(), files: List[UploadFile] =
|
||||
file.filename = file_name
|
||||
if flag_name == 'logo' or flag_name == 'float_icon':
|
||||
try:
|
||||
SQLBotFileUtils.check_file(file=file, file_types=[".jpg", ".png", ".svg"],
|
||||
SQLBotFileUtils.check_file(file=file, file_types=[".jpg", ".jpeg", ".png"],
|
||||
limit_file_size=(10 * 1024 * 1024))
|
||||
except ValueError as e:
|
||||
error_msg = str(e)
|
||||
|
||||
@@ -15,7 +15,7 @@ async def get_groups(session: SessionDep, flag: str) -> list[SysArgModel]:
|
||||
|
||||
async def save_parameter_args(session: SessionDep, request: Request):
|
||||
allow_file_mapping = {
|
||||
""" "test_logo": { "types": [".jpg", ".jpeg", ".png", ".svg"], "size": 5 * 1024 * 1024 } """
|
||||
""" "test_logo": { "types": [".jpg", ".jpeg", ".png"], "size": 5 * 1024 * 1024 } """
|
||||
}
|
||||
form_data = await request.form()
|
||||
files = form_data.getlist("files")
|
||||
|
||||
Reference in New Issue
Block a user