Corrupted downloaded pictures / action.php #1683

Open
opened 2026-10-05 00:52:52 +02:00 by adam · 1 comment
Owner

Hi,
looks like downloading pictures from my piwigo 13.7.0 gives corrupted files. It's through download link : action.php?id=106772&part=e&download

At the end of action.php, adding ob_end_clean(); before the "ob_flush() 'n' flush();" stuff solved my problem.

Was reading a bit of : https://github.com/Piwigo/Piwigo/issues/643#issuecomment-769504627 and https://github.com/Piwigo/Piwigo/issues/1297#issuecomment-1266606502

The corrupted downloaded file had a bit of data added at the beginning and some removed at the end, as shown by this diff command

diff -y <(od -An -tx1 -w1 -v  downloaded.jpg) <(od -An -tx1 -w1 -v original.jpg) | grep -E \(\<\|\>\)
 ef                                                           <
 bb                                                           <
 bf                                                           <
                                                              >  51
                                                              >  ff
                                                              >  d9
Hi, looks like downloading pictures from my piwigo 13.7.0 gives corrupted files. It's through download link : action.php?id=106772&part=e&download At the end of action.php, adding ob_end_clean(); before the "ob_flush() 'n' flush();" stuff solved my problem. Was reading a bit of : https://github.com/Piwigo/Piwigo/issues/643#issuecomment-769504627 and https://github.com/Piwigo/Piwigo/issues/1297#issuecomment-1266606502 The corrupted downloaded file had a bit of data added at the beginning and some removed at the end, as shown by this diff command ``` diff -y <(od -An -tx1 -w1 -v downloaded.jpg) <(od -An -tx1 -w1 -v original.jpg) | grep -E \(\<\|\>\) ``` ``` ef < bb < bf < > 51 > ff > d9 ``` <!-- github-sync-id:1775801490 -->
Author
Owner

Thank you so much adding ob_end_clean(); before the "ob_flush() fixed my problem to!!! reallyyy apreciate :)

Thank you so much adding ob_end_clean(); before the "ob_flush() fixed my problem to!!! reallyyy apreciate :) <!-- github-comment-id:2853712380 -->
Sign in to join this conversation.
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: adam/Piwigo#1683