mirror of
				https://gitee.com/gitea/gitea
				synced 2025-11-04 16:40:24 +08:00 
			
		
		
		
	fix image display
This commit is contained in:
		@@ -51,6 +51,14 @@ func IsTextFile(data []byte) (string, bool) {
 | 
			
		||||
	return contentType, false
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func IsImageFile(data []byte) (string, bool) {
 | 
			
		||||
	contentType := http.DetectContentType(data)
 | 
			
		||||
	if strings.Index(contentType, "img/") != -1 {
 | 
			
		||||
		return contentType, true
 | 
			
		||||
	}
 | 
			
		||||
	return contentType, false
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func IsReadmeFile(name string) bool {
 | 
			
		||||
	name = strings.ToLower(name)
 | 
			
		||||
	if len(name) < 6 {
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user