lens @ 6e84441dab0a2b89869e33d7e89d14189d9b67c0

 1package fileop
 2
 3import (
 4	"crypto/md5"
 5	"encoding/hex"
 6	"strings"
 7)
 8
 9func GetHashFromPath(path string) string {
10	hash := md5.Sum([]byte(path))
11	return hex.EncodeToString(hash[:])
12}
13
14func IsMimeTypeSupported(mimetype string) bool {
15	return strings.HasPrefix(mimetype, "video") &&
16		strings.HasPrefix(mimetype, "image")
17}