Index: xmlrpc.php
===================================================================
--- xmlrpc.php	(revision 13588)
+++ xmlrpc.php	(working copy)
@@ -2807,6 +2807,17 @@
 			logIO('O', '(MW) ' . $errorString);
 			return new IXR_Error(500, $errorString);
 		}
+
+		//if we don't know the type of the file, try to figure it out...
+		//...at least for the common case of image uploads
+		if(!isset($type) || $type == '') {
+			$sizedata = getimagesize($upload[ 'url' ]);
+			
+			if($sizedata != FALSE) {
+				$type = $sizedata['mime'];
+			}
+		}
+
 		// Construct the attachment array
 		// attach to post_id 0
 		$post_id = 0;
