diff --git a/Thumbnailer.go b/Thumbnailer.go index 913c7ee..043b067 100644 --- a/Thumbnailer.go +++ b/Thumbnailer.go @@ -49,6 +49,15 @@ func (this *Thumbnailer) RenderFile(absPath string) ([]byte, error) { return thumb.([]byte), nil } +func FiletypeSupported(ext string) bool { + switch strings.ToLower(ext) { + case ".jpg", ".jpeg", ".png", ".gif", ".avi", ".mkv", ".mp4", ".ogm", ".wmv": + return true + default: + return false + } +} + func (this *Thumbnailer) RenderFile_NoCache(absPath string) ([]byte, error) { fh, err := os.OpenFile(absPath, os.O_RDONLY, 0400)