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:
parent
8559d6f267
commit
6ade13e86e
4 changed files with 12 additions and 0 deletions
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue