GNOME Bugzilla – Bug 163786
Image uploading with MetaWebLog
Last modified: 2005-01-13 11:40:20 UTC
Please describe the problem: When adding a picture to the post, it gets uploaded but it's corrupt and the posting only contains <img src="None" /> I tested it with Wordpress. Steps to reproduce: 1. Create a new post with an image in 2. Save the post 3. Actual results: No image in the post Expected results: An image in the post Does this happen every time? Other information:
I'm experiencing the same problem on my blog (WP). The image is getting upload to my server alright, but the posting only contains the <img src="None" />, like Bart is getting.
Me too, the file gets uploaded, bu the link is wrong.. !
I changed these lines in MetaWeblog.py file, and the image url generation works fine: try: imageurl = server.metaWeblog.newMediaObject(blog_id, username, password, content) return imageurl['url'] except xmlrpclib.Fault, e: hig_alert.handleBloggerAPIFault(e, "Could not post Image", username, blog_id, url) success = FALSE except xmlrpclib.ProtocolError, e: hig_alert.reportError("Could not post Blog entry", 'URL \'%s\' does not seem to be a valid bloggerAPI XML-RPC server. Web server reported: %s.' % (url, hig_alert.italic(e.errmsg))) success = FALSE return "" However, the uploaded image seems to be corrupted ! The browser says: The image “http://entagged.sourceforge.net/misc/wordpress/images/gnome-blog.png” cannot be displayed, because it contains errors. And when i download it from my server, it is in fact bigger than the original..
Sorry, it got completely messed up : try: imageurl = server.metaWeblog.newMediaObject(blog_id, username, password, content) return imageurl['url'] except: [...] except: [...] return ""
The file corruption issue was caused by WordPress. Using their latest "stable" release, the file isn't base64-decoded, and so the uploaded image is in fact the base64 string, which is of course unreadable as an image. Here is the bug report upstream.. http://mosquito.wordpress.org/view.php?id=679
Raphael, could you make a "diff -u" patch with your change?
ok, I've made what I hope is an equivalent change in CVS, but I can't test since I have no wordpress :-P Please tell me if it doesn't work!
I tried out your change in CVS, and was still unable to get an image to post. I'm still getting that '<img src="None" />'. :(
Disregard my last post. CVS hasn't synced up since Seth made his changes. D'Oh.
If you can confirm it working (or not) when it syncs, that'd be great.
Ok Seth, I cn confirm the chages you did are the same as mine, and everything works perfectly :) (except that bug upstream)
Seth, the post is getting the correct url, but the image is still not being displayed. I'm getting the following error when trying to view the image that was uploaded: The image “http://piedmont.homelinux.org/images/desktop_2005.jpg” cannot be displayed, because it contains errors. I've tried this with multiple images, and get the same message for each one.
See Comment #5, this is a wordpress bug !
Whoops. Didn't see Raphael's earlier post on this error, which seems to be due to WP.