Serve audio files using HTML5 audio tag (#5221)
* Serve audio files using HTML5 audio tag * Correct copy paste error
This commit is contained in:
parent
735b12eaf0
commit
db30d6d791
4 changed files with 12 additions and 0 deletions
|
@ -576,6 +576,11 @@ func IsVideoFile(data []byte) bool {
|
|||
return strings.Index(http.DetectContentType(data), "video/") != -1
|
||||
}
|
||||
|
||||
// IsAudioFile detects if data is an video format
|
||||
func IsAudioFile(data []byte) bool {
|
||||
return strings.Index(http.DetectContentType(data), "audio/") != -1
|
||||
}
|
||||
|
||||
// EntryIcon returns the octicon class for displaying files/directories
|
||||
func EntryIcon(entry *git.TreeEntry) string {
|
||||
switch {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue