BinaryFileName handles the filename of the data was saved in a BinaryData.
Beispiel #1
0
		private static string GetMimeType(BinaryFileName value)
		{
            if (value == null)
                return string.Empty;
			string ext = value.Extension;
            if (ext == null)
                return string.Empty;
			if (ext.Length > 0 && ext[0] == '.')
				ext = ext.Substring(1);
            var mimeType = MimeTable.GetMimeType(ext.ToLower(CultureInfo.InvariantCulture));
			return mimeType;
		}