wangshan 1 жил өмнө
parent
commit
3c8342a051

+ 1 - 1
rpc/internal/logic/savefilelogic.go

@@ -60,7 +60,7 @@ func (l *SaveFileLogic) SaveFile(in *filesystem.SaveFileReq) (*filesystem.FileOp
 		// oss.Meta("MyProp", "MyPropVal"),
 		// oss.Meta("MyProp", "MyPropVal"),
 	}
 	}
 	if fs := strings.Split(in.FileId, "."); len(fs) > 1 {
 	if fs := strings.Split(in.FileId, "."); len(fs) > 1 {
-		suffix := fs[1]
+		suffix := strings.ToLower(fs[1])
 		if charset := config.Cf.ContentType[suffix]; charset != "" {
 		if charset := config.Cf.ContentType[suffix]; charset != "" {
 			options = append(options, oss.ContentType(fmt.Sprintf("text/plain; charset=%s", charset)))
 			options = append(options, oss.ContentType(fmt.Sprintf("text/plain; charset=%s", charset)))
 		}
 		}