Ticket #12518: mimetype.patch
File mimetype.patch, 630 bytes (added by , 15 years ago) |
---|
-
xmlrpc.php
2807 2807 logIO('O', '(MW) ' . $errorString); 2808 2808 return new IXR_Error(500, $errorString); 2809 2809 } 2810 2811 //if we don't know the type of the file, try to figure it out... 2812 //...at least for the common case of image uploads 2813 if(!isset($type) || $type == '') { 2814 $sizedata = getimagesize($upload[ 'url' ]); 2815 2816 if($sizedata != FALSE) { 2817 $type = $sizedata['mime']; 2818 } 2819 } 2820 2810 2821 // Construct the attachment array 2811 2822 // attach to post_id 0 2812 2823 $post_id = 0;