mirror of
https://github.com/go-gitea/gitea
synced 2025-07-15 23:17:19 +00:00
serve video files using the HTML5 video tag (#418)
* serve video files using the HTML5 video tag * lint fix: add comment to IsVideoFile
This commit is contained in:
@@ -494,3 +494,8 @@ func IsImageFile(data []byte) bool {
|
||||
func IsPDFFile(data []byte) bool {
|
||||
return strings.Index(http.DetectContentType(data), "application/pdf") != -1
|
||||
}
|
||||
|
||||
// IsVideoFile detectes if data is an video format
|
||||
func IsVideoFile(data []byte) bool {
|
||||
return strings.Index(http.DetectContentType(data), "video/") != -1
|
||||
}
|
||||
|
Reference in New Issue
Block a user