allowed := false
for _, t := range allowedTypes {
t := strings.Trim(t, " ")
- if t == "*/*" || t == fileType {
+ if t == "*/*" || t == fileType ||
+ strings.HasPrefix(fileType, t+";") {
allowed = true
break
}
allowed := false
for _, t := range allowedTypes {
t := strings.Trim(t, " ")
- if t == "*/*" || t == fileType {
+ if t == "*/*" || t == fileType ||
+ strings.HasPrefix(fileType, t+";") {
allowed = true
break
}
allowed := false
for _, t := range setting.Repository.Upload.AllowedTypes {
t := strings.Trim(t, " ")
- if t == "*/*" || t == fileType {
+ if t == "*/*" || t == fileType ||
+ strings.HasPrefix(fileType, t+";") {
allowed = true
break
}