add device upload options

This commit is contained in:
Luke Pulverenti
2014-10-11 16:38:13 -04:00
parent 2486cffa71
commit f3539686bd
50 changed files with 1030 additions and 209 deletions

View File

@@ -315,5 +315,20 @@ namespace MediaBrowser.Common.Net
throw new ArgumentException("Argument not supported: " + path);
}
private static readonly Dictionary<string, string> MimeExtensions =
new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase)
{
{"image/jpeg", "jpg"},
{"image/jpg", "jpg"},
{"image/png", "png"},
{"image/gif", "gif"},
{"image/webp", "webp"}
};
public static string ToExtension(string mimeType)
{
return "." + MimeExtensions[mimeType];
}
}
}