aboutsummaryrefslogtreecommitdiff
path: root/modules/base
diff options
context:
space:
mode:
Diffstat (limited to 'modules/base')
-rw-r--r--modules/base/tool.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/modules/base/tool.go b/modules/base/tool.go
index 52d1e178..f42c8b85 100644
--- a/modules/base/tool.go
+++ b/modules/base/tool.go
@@ -533,3 +533,7 @@ func IsImageFile(data []byte) bool {
func IsPDFFile(data []byte) bool {
return strings.Index(http.DetectContentType(data), "application/pdf") != -1
}
+
+func IsVideoFile(data []byte) bool {
+ return strings.Index(http.DetectContentType(data), "video/") != -1
+}