package helpers

import (
	"path/filepath"
	"strings"
)

func GetFileType(filename string) string {
	ext := strings.ToLower(filepath.Ext(filename))
	switch ext {
	case ".jpg", ".png":
		return "image"
	case ".mp4":
		return "video"
	case ".txt", ".doc", ".docx", ".csv", ".xlsx", ".pdf":
		return "document"
	default:
		return "unsupported"
	}
}
