mirror of
https://github.com/gogs/gogs.git
synced 2026-05-07 16:45:30 +02:00
serve video files using the HTML5 video tag (#3967)
This commit is contained in:
@@ -533,3 +533,7 @@ func IsImageFile(data []byte) bool {
|
||||
func IsPDFFile(data []byte) bool {
|
||||
return strings.Index(http.DetectContentType(data), "application/pdf") != -1
|
||||
}
|
||||
|
||||
func IsVideoFile(data []byte) bool {
|
||||
return strings.Index(http.DetectContentType(data), "video/") != -1
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user