Index: modules/blogapi/blogapi.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/blogapi/blogapi.module,v
retrieving revision 1.137
diff -u -p -r1.137 blogapi.module
--- modules/blogapi/blogapi.module	30 Dec 2008 16:43:15 -0000	1.137
+++ modules/blogapi/blogapi.module	9 Jan 2009 21:09:15 -0000
@@ -461,6 +461,11 @@ function blogapi_metaweblog_new_media_ob
   }
 
   $data = $file['bits'];
+   
+  // Check for base64-encoded data, and decode if so.
+  if ( $decoded_data = base64_decode($data)) {
+    $data = $decoded_data;
+  }
 
   if (!$data) {
     return blogapi_error(t('No file sent.'));
