diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/attach.php | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/include/attach.php b/include/attach.php index e3c40f68d..7988286c9 100644 --- a/include/attach.php +++ b/include/attach.php @@ -1636,12 +1636,13 @@ function find_filename_by_hash($channel_id, $attachHash) { * * @param resource $in File pointer of input * @param resource $out File pointer of output + * @param int $bufsize size of chunk, default 16384 * @return number with the size */ -function pipe_streams($in, $out) { +function pipe_streams($in, $out, $bufize = 16384) { $size = 0; while (!feof($in)) - $size += fwrite($out, fread($in, 16384)); + $size += fwrite($out, fread($in, $bufsize)); return $size; } |