diff --git a/pkg/utils/http.go b/pkg/utils/http.go index c5eca82..1ffd3d9 100644 --- a/pkg/utils/http.go +++ b/pkg/utils/http.go @@ -58,7 +58,8 @@ func PutFromFileUrlWithStream(url, fileName, fileUrl string) (statusCode int, re client := &http.Client{} resp, err := client.Do(req) if err != nil { - panic(err) + //panic(err) + return 400, "执行文件上传失败" } defer resp.Body.Close() statusCode = resp.StatusCode