add set background and icon of hub functions

This commit is contained in:
2026-05-03 19:30:22 +02:00
parent c0d4483154
commit 22e2d18810
5 changed files with 131 additions and 23 deletions
+11
View File
@@ -15,6 +15,8 @@ const (
file
avatar
profileBg
hubIcon
hubBackground
)
func validCheckWithResponseOnFail(response http.ResponseWriter, request *http.Request, pt bodyLimit) bool {
@@ -22,10 +24,19 @@ func validCheckWithResponseOnFail(response http.ResponseWriter, request *http.Re
switch pt {
case file:
maxSize = int64(config.MaxRequestWithFileBytes)
break
case avatar:
maxSize = int64(config.MaxRequestWithAvatarBytes)
break
case profileBg:
maxSize = int64(config.MaxRequestWithProfileBgBytes)
break
case hubIcon:
maxSize = int64(config.MaxRequestWithHubIconBytes)
break
case hubBackground:
maxSize = int64(config.MaxRequestWithHubBackgroundBytes)
break
default:
maxSize = int64(config.MaxRequestBytes)
}