From f09e3e7c0a25b9e5e904e7e9141469ccb565b67e Mon Sep 17 00:00:00 2001 From: Adrian Siemieniak Date: Wed, 22 Mar 2017 22:22:46 +0100 Subject: [PATCH] =?UTF-8?q?Some=20(most)=20of=20downloaded=20pictures=20ca?= =?UTF-8?q?me=20corrupted=20(completelly=20different=20binary=20file,=20bu?= =?UTF-8?q?t=20of=20the=20right=20size).=20After=20investigation,=20it=20l?= =?UTF-8?q?ooks=20like=20we=20need=20to=20"ob=5Fclean=20=E2=80=94=20Clean?= =?UTF-8?q?=20(erase)=20the=20output=20buffer"=20and=20"flush=20=E2=80=94?= =?UTF-8?q?=20Flush=20system=20output=20buffer"=20before=20doing=20readfil?= =?UTF-8?q?e().?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- action.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/action.php b/action.php index 1d6b23c8c..3b071bc68 100644 --- a/action.php +++ b/action.php @@ -220,7 +220,9 @@ if (ini_get('safe_mode') == 0) { @set_time_limit(0); } - +// Without clean and flush there may be some image download problems, or image can be corrupted after download +ob_clean(); +flush(); @readfile($file); -?> \ No newline at end of file +?>