stream large photos through buffered I/O if possible

This commit is contained in:
redmatrix
2016-06-29 17:31:48 -07:00
parent 05aba0b4dd
commit 2e93a09d83
2 changed files with 28 additions and 4 deletions

View File

@@ -1468,7 +1468,7 @@ function find_filename_by_hash($channel_id, $attachHash) {
function pipe_streams($in, $out) {
$size = 0;
while (!feof($in))
$size += fwrite($out, fread($in, 8192));
$size += fwrite($out, fread($in, 16384));
return $size;
}