add configs from file, continue develpoment on hubs
This commit is contained in:
@@ -5,7 +5,7 @@ import (
|
||||
"net/http"
|
||||
"strings"
|
||||
|
||||
"go-socket/packages/globals"
|
||||
"go-socket/packages/config"
|
||||
)
|
||||
|
||||
type postType uint8
|
||||
@@ -21,13 +21,13 @@ func validCheckWithResponseOnFail(response *http.ResponseWriter, request *http.R
|
||||
var maxSize int64
|
||||
switch pt {
|
||||
case file:
|
||||
maxSize = int64(globals.MaxRequestWithFileBytes)
|
||||
maxSize = int64(config.MaxRequestWithFileBytes)
|
||||
case avatar:
|
||||
maxSize = int64(globals.MaxRequestWithAvatarBytes)
|
||||
maxSize = int64(config.MaxRequestWithAvatarBytes)
|
||||
case profileBg:
|
||||
maxSize = int64(globals.MaxRequestWithProfileBgBytes)
|
||||
maxSize = int64(config.MaxRequestWithProfileBgBytes)
|
||||
default:
|
||||
maxSize = int64(globals.MaxRequestBytes)
|
||||
maxSize = int64(config.MaxRequestBytes)
|
||||
}
|
||||
|
||||
if request.ContentLength > maxSize {
|
||||
|
||||
Reference in New Issue
Block a user