RadioDld.RssServer.MimeTypeForFile C# (CSharp) Method

MimeTypeForFile() private method

private MimeTypeForFile ( string filePath ) : string
filePath string
return string
        private string MimeTypeForFile(string filePath)
        {
            switch (Path.GetExtension(filePath).ToUpperInvariant())
            {
                case ".MP3":
                    return "audio/mpeg";
                case ".M4A":
                case ".MP4A":
                    return "audio/mp4";
                case ".OGA":
                case ".OGG":
                case ".OPUS":
                    return "audio/ogg";
                case ".FLAC":
                    return "audio/flac";
                default:
                    throw new NotImplementedException("MIME type not known for file extension " + Path.GetExtension(filePath));
            }
        }