package fileop import ( "crypto/md5" "encoding/hex" "strings" ) func GetHashFromPath(path string) string { hash := md5.Sum([]byte(path)) return hex.EncodeToString(hash[:]) } func IsMimeTypeSupported(mimetype string) bool { if mimetype == "image/svg+xml" || mimetype == "video/mp2t" { return false } return strings.HasPrefix(mimetype, "video") || strings.HasPrefix(mimetype, "image") }