updated automigrate templates, added js bindings tests and updated models IsNew behavior

This commit is contained in:
Gani Georgiev
2022-12-05 13:57:09 +02:00
parent 604009bd10
commit b8cd686b32
21 changed files with 546 additions and 213 deletions
+1 -1
View File
@@ -77,7 +77,7 @@ func FindUploadedFiles(r *http.Request, key string) ([]*UploadedFile, error) {
sanitizedName := inflector.Snakecase(originalName)
if length := len(sanitizedName); length < 3 {
// the name is too short so we concatenate an additional random part
sanitizedName += ("_" + security.RandomString(10))
sanitizedName += security.RandomString(10)
} else if length > 100 {
// keep only the first 100 characters (it is multibyte safe after Snakecase)
sanitizedName = sanitizedName[:100]