mirror of
https://gitee.com/gitea/gitea
synced 2025-12-25 09:46:34 +08:00
upload support text/plain; charset=utf8 (#7899)
This commit is contained in:
@@ -48,7 +48,8 @@ func UploadAttachment(ctx *context.Context) {
|
||||
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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user