This commit is contained in:
Mahmoud Al-Qudsi 2018-07-21 16:54:57 +00:00 committed by GitHub
commit 316cd02333
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -48,7 +48,7 @@ func UploadAttachment(ctx *context.Context) {
allowed := false
for _, t := range allowedTypes {
t := strings.Trim(t, " ")
if t == "*/*" || t == fileType {
if t == "*/*" || strings.HasPrefix(fileType, t) {
allowed = true
break
}