Corrupt Downloads in WP-E-Commerce

I have a digital article on my website. A few days after I published the article, I had my first purchase.


But just minutes after the purchase report, I received another mail from the customer: The ZIP file was corrupt. So I tested with a small graphic as an digital article. The same problem again.

Randym found the solution and posted it at the getshopped forum

He added the following three lines of code to the function wpsc_readfile_chunked:

header( ‘Content-Type:’ );

just before these lines:

while ( !feof( $handle ) ) {
    $buffer = fread( $handle, $chunksize );