mirror of https://gitee.com/answerdev/answer.git
fix(upload): Use the correct upload type
This commit is contained in:
parent
fcf29b1a79
commit
3c4c91b2aa
|
@ -160,7 +160,7 @@ func (us *uploaderService) AvatarThumbFile(ctx *gin.Context, fileName string, si
|
|||
|
||||
func (us *uploaderService) UploadPostFile(ctx *gin.Context) (
|
||||
url string, err error) {
|
||||
url, err = us.tryToUploadByPlugin(ctx, plugin.UserAvatar)
|
||||
url, err = us.tryToUploadByPlugin(ctx, plugin.UserPost)
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
|
@ -186,7 +186,7 @@ func (us *uploaderService) UploadPostFile(ctx *gin.Context) (
|
|||
|
||||
func (us *uploaderService) UploadBrandingFile(ctx *gin.Context) (
|
||||
url string, err error) {
|
||||
url, err = us.tryToUploadByPlugin(ctx, plugin.UserAvatar)
|
||||
url, err = us.tryToUploadByPlugin(ctx, plugin.AdminBranding)
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
|
|
|
@ -21,7 +21,10 @@ var (
|
|||
".png": true,
|
||||
},
|
||||
AdminBranding: {
|
||||
".ico": true,
|
||||
".jpg": true,
|
||||
".jpeg": true,
|
||||
".png": true,
|
||||
".ico": true,
|
||||
},
|
||||
}
|
||||
)
|
||||
|
|
Loading…
Reference in New Issue