After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 163786 - Image uploading with MetaWebLog
Image uploading with MetaWebLog
Status: RESOLVED FIXED
Product: gnome-blog
Classification: Other
Component: Blog Applet
0.8
Other All
: Normal normal
: ---
Assigned To: GNOME blog maintainers
GNOME blog maintainers
Depends on:
Blocks:
 
 
Reported: 2005-01-12 11:01 UTC by Bart Vanbrabant
Modified: 2005-01-13 11:40 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Bart Vanbrabant 2005-01-12 11:01:27 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:
Comment 1 Brian Pepple 2005-01-12 20:02:48 UTC
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.
Comment 2 Raphael Slinckx 2005-01-12 22:22:16 UTC
Me too, the file gets uploaded, bu the link is wrong.. !
Comment 3 Raphael Slinckx 2005-01-12 22:51:02 UTC
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..
Comment 4 Raphael Slinckx 2005-01-12 22:52:28 UTC
Sorry, it got completely messed up :

try:

imageurl = server.metaWeblog.newMediaObject(blog_id, username, password, content)
return imageurl['url']

except: [...]
except: [...]

return ""
Comment 5 Raphael Slinckx 2005-01-12 23:27:51 UTC
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
Comment 6 Seth Nickell 2005-01-13 01:25:34 UTC
Raphael, could you make a "diff -u" patch with your change?
Comment 7 Seth Nickell 2005-01-13 02:04:55 UTC
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!
Comment 8 Brian Pepple 2005-01-13 02:31:30 UTC
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" />'. :(
Comment 9 Brian Pepple 2005-01-13 02:41:29 UTC
Disregard my last post.  CVS hasn't synced up since Seth made his changes.  D'Oh.
Comment 10 Seth Nickell 2005-01-13 02:52:07 UTC
If you can confirm it working (or not) when it syncs, that'd be great.
Comment 11 Raphael Slinckx 2005-01-13 11:20:08 UTC
Ok Seth, I cn confirm the chages you did are the same as mine, and everything
works perfectly :) (except that bug upstream)
Comment 12 Brian Pepple 2005-01-13 11:32:12 UTC
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.
Comment 13 Raphael Slinckx 2005-01-13 11:40:06 UTC
See Comment #5, this is a wordpress bug !
Comment 14 Brian Pepple 2005-01-13 11:40:20 UTC
Whoops.  Didn't see Raphael's earlier post on this error, which seems to be due
to WP.