MCPcopy Index your code
hub / github.com/TruthHun/BookStack / isMedia

Method isMedia

controllers/StaticController.go:117–123  ·  view source on GitHub ↗

是否是音视频

(path string)

Source from the content-addressed store, hash-verified

115
116// 是否是音视频
117func (this *StaticController) isMedia(path string) (yes bool) {
118 var videoOK, audioOK bool
119 ext := strings.ToLower(filepath.Ext(path))
120 _, videoOK = conf.VideoExt.Load(ext)
121 _, audioOK = conf.AudioExt.Load(ext)
122 return audioOK || videoOK
123}
124
125// 是否是书籍项目所有人(书籍项目所有人,可以直链播放音视频)
126func (this *StaticController) isBookOwner() (yes bool) {

Callers 2

UploadsMethod · 0.95
ProjectsFileMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected