public string DetectMimeType(string fileName) { var extension = GetExtension(fileName); return(ContentTypes.ContainsKey(extension) ? ContentTypes[extension] : "application/octet-stream"); }