Server.Request.MapMIMEType C# (CSharp) 메소드

MapMIMEType() 개인적인 정적인 메소드

private static MapMIMEType ( string filePath, string type ) : string
filePath string
type string
리턴 string
        private static string MapMIMEType(string filePath, string type)
        {
            switch (GetFileExtentsion(filePath)) {
                case "css":
                    type = "text/css";
                    break;
                case "xml":
                case "xsl":
                    type = "text/xml";
                    break;
                case "jpg":
                case "jpeg":
                    type = "image/jpeg";
                    break;
                case "gif":
                    type = "image/gif";
                    break;
                    // Not exhaustive. Extend this list as required.
            }
            return type;
        }