mirror of
https://github.com/casdoor/casdoor.git
synced 2025-07-04 13:20:19 +08:00
Support svg in downloadImage()
This commit is contained in:
@ -69,6 +69,8 @@ func downloadImage(client *http.Client, url string) (*bytes.Buffer, string, erro
|
|||||||
fileExtension = ".ico"
|
fileExtension = ".ico"
|
||||||
case "image/x-icon":
|
case "image/x-icon":
|
||||||
fileExtension = ".ico"
|
fileExtension = ".ico"
|
||||||
|
case "image/svg+xml":
|
||||||
|
fileExtension = ".svg"
|
||||||
default:
|
default:
|
||||||
return nil, "", fmt.Errorf("unsupported content type: %s", contentType)
|
return nil, "", fmt.Errorf("unsupported content type: %s", contentType)
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user