fiex:1. 加强发送消息接口的逻辑 , 2.解决在网页图片上直接右键复制图片(非jpg的)后,粘贴到消息框,发送后出现错误

This commit is contained in:
weifashi
2023-08-03 18:09:11 +08:00
parent 7147db0ef2
commit e26d75c894
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -641,7 +641,7 @@ class WebSocketDialogMsg extends AbstractModel
}
// 其他网络图片
$imageSaveLocal = Base::settingFind("system", "image_save_local");
preg_match_all("/<img[^>]*?src=([\"'])(.*?\.(png|jpg|jpeg|webp|gif))\\1[^>]*?>/is", $text, $matchs);
preg_match_all("/<img[^>]*?src=([\"'])(.*?(png|jpg|jpeg|webp|gif).*?)\\1[^>]*?>/is", $text, $matchs);
foreach ($matchs[2] as $key => $str) {
if ($imageSaveLocal === 'close') {
$imageSize = getimagesize($str);