Index: modules/blogapi/blogapi.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/blogapi/blogapi.module,v
retrieving revision 1.115.2.5
diff -u -p -r1.115.2.5 blogapi.module
--- modules/blogapi/blogapi.module	8 Oct 2008 20:12:17 -0000	1.115.2.5
+++ modules/blogapi/blogapi.module	9 Jan 2009 21:12:54 -0000
@@ -452,6 +452,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.'));
   }
