Opened 15 years ago

Last modified 15 years ago

#215 closed defect (FIXED)

Some `medium.jpg` images are not saved to CloudFiles successfully.

Reported by: joar Owned by: joar
Priority: minor Milestone: 0.0.5
Component: programming Keywords:
Cc: Parent Tickets:

Description

Change History (4)

comment:1 by Christopher Allan Webber, 15 years ago

Milestone: 0.0.5

Marking this for 0.0.5 even though I know we'll roll it for 0.0.6 most likely ;)

comment:2 by joar, 15 years ago

As said on IRC, the problem was that cloudfiles did not implicitly append the contents of a write().

Those medium.jpg files that were affected were those who PIL did buffered writes for.

I solved this in https://github.com/jwandborg/mediagoblin/tree/cloudfiles_storage_object_wrapper . It now does a check if the file object has a size, if so, it appends the new data to any existing data and then writes it all.

Please review and merge.

Cheers,

comment:3 by Christopher Allan Webber, 15 years ago

Owner: set to Joar Wandborg
Status: NewClosed

This solution seems a bit curious, but it looks like it works, so I merged it. I also added a bit to the docs explaining that there was buffering happening on both ends, and that was related to the corruption (not a thorough description, but decent enough for now).

I'm not sure we need this class inside a class stuff. It looks like we don't to me, so I removed it from there and moved it into its own class.

Anyway! Merged, and closed. Thanks for the sleuthing on this one, Joar! :)

comment:4 by Will Kahn-Greene, 14 years ago

The original url for this bug was http://bugs.foocorp.net/issues/512 .

Note: See TracTickets for help on using tickets.