[gnome-blog] Fixed MetaWeblog image upload by changing image encoding for base64 to xmlrpclib.Binary() as pointed



commit 199deaf15042288786eb61d0b28065384ca6f191
Author: Tommi Asiala <tommi asiala info>
Date:   Thu Mar 4 21:46:02 2010 +0200

    Fixed MetaWeblog image upload by changing image encoding for base64 to xmlrpclib.Binary() as pointed out by Matthew Good

 protocols/MetaWeblog.py |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/protocols/MetaWeblog.py b/protocols/MetaWeblog.py
index b3569be..63bef90 100644
--- a/protocols/MetaWeblog.py
+++ b/protocols/MetaWeblog.py
@@ -68,7 +68,7 @@ class Blog(bloggerAPI.Blog):
         content = {}
         content['name'] = file_name
         content['type'] = mime_type
-        content['bits'] = base64.encodestring(file_contents)
+        content['bits'] = xmlrpclib.Binary(file_contents)
 
         imageurl = None
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]