mirror of https://gitee.com/answerdev/answer.git
fix: rename icon ext is ico
This commit is contained in:
parent
53f6413d45
commit
3a817bb6c8
|
@ -170,7 +170,7 @@ func (us *UploaderService) UploadBrandingFile(ctx *gin.Context) (
|
||||||
}
|
}
|
||||||
fileExt := strings.ToLower(path.Ext(file.Filename))
|
fileExt := strings.ToLower(path.Ext(file.Filename))
|
||||||
_, ok := FormatExts[fileExt]
|
_, ok := FormatExts[fileExt]
|
||||||
if !ok && fileExt != ".icon" {
|
if !ok && fileExt != ".ico" {
|
||||||
handler.HandleResponse(ctx, errors.BadRequest(reason.RequestFormatError), nil)
|
handler.HandleResponse(ctx, errors.BadRequest(reason.RequestFormatError), nil)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue