mirror of
https://github.com/songquanpeng/one-api.git
synced 2025-09-29 06:36:38 +08:00
Fix GetImageSizeFromUrl for image url without Content-Type
This commit is contained in:
parent
b747cdbc6f
commit
052092391d
@ -30,10 +30,6 @@ func IsImageUrl(url string) (bool, error) {
|
||||
}
|
||||
|
||||
func GetImageSizeFromUrl(url string) (width int, height int, err error) {
|
||||
isImage, err := IsImageUrl(url)
|
||||
if !isImage {
|
||||
return
|
||||
}
|
||||
resp, err := http.Get(url)
|
||||
if err != nil {
|
||||
return
|
||||
|
Loading…
Reference in New Issue
Block a user