fix: 更新 ImageMessage 的 URL 处理逻辑,修复日志记录方式并移除冗余日志

This commit is contained in:
lixiangwuxian
2025-04-10 01:59:41 +08:00
parent bb6187dcc1
commit 9400e317ea
3 changed files with 5 additions and 13 deletions

View File

@@ -65,11 +65,6 @@ func normalizeURL(rawURL string) string {
// DownloadFile 下载文件到指定目录,返回带有正确扩展名的完整文件路径
func DownloadFile(url string, dirPath string) (filepath string, err error) {
url = strings.ReplaceAll(url, ",", ",")
url = strings.ReplaceAll(url, "[", "[")
url = strings.ReplaceAll(url, "]", "]")
url = strings.ReplaceAll(url, "&", "&")
// 发送 HTTP GET 请求
var resp *http.Response
var maxRetry = 100