mirror of
https://github.com/go-gitea/gitea.git
synced 2025-06-22 05:58:02 +02:00
Serve audio files using HTML5 audio tag (#5221)
* Serve audio files using HTML5 audio tag * Correct copy paste error
This commit is contained in:
@ -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 {
|
||||
|
Reference in New Issue
Block a user