diff --git a/internal/service/uploader/upload.go b/internal/service/uploader/upload.go index f6c14686..19bf6322 100644 --- a/internal/service/uploader/upload.go +++ b/internal/service/uploader/upload.go @@ -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 } diff --git a/plugin/storage.go b/plugin/storage.go index 82dd59d6..51f4bb84 100644 --- a/plugin/storage.go +++ b/plugin/storage.go @@ -21,7 +21,10 @@ var ( ".png": true, }, AdminBranding: { - ".ico": true, + ".jpg": true, + ".jpeg": true, + ".png": true, + ".ico": true, }, } )