Modified GetMimeType to return binary type if there is no extension.
This commit is contained in:
1 parent
cf477522c0
commit
b9e1f2ca7d
1 file changed
+2
-2
@@ -10,8 +10,8 @@ namespace MontoyaTech.Rest.Net
|
||||
{
|
||||
public static string GetMimeType(this string extension)
|
||||
{
|
||||
if (extension == null)
|
||||
throw new ArgumentNullException("extension");
|
||||
if (string.IsNullOrWhiteSpace(extension))
|
||||
return "application/octet-stream";
|
||||
|
||||
if (extension.StartsWith("."))
|
||||
extension = extension.Substring(1);
|
||||
|
||||
Reference in new issue
Block a user