diff --git a/.gitignore b/.gitignore index 7b12609a..02bb49b7 100644 --- a/.gitignore +++ b/.gitignore @@ -11,7 +11,6 @@ docs/docs_style.css docs/index.html docs/quick-guide.html docs/step-by-step-guide.html -download_attachment.php file_limits.php footer.txt header.txt diff --git a/download_attachment.php b/download_attachment.php new file mode 100755 index 00000000..a6ad6a22 --- /dev/null +++ b/download_attachment.php @@ -0,0 +1,175 @@ + $chunksize) +{ + $handle = fopen($realpath, 'rb'); + $buffer = ''; + while ( ! feof($handle)) + { + set_time_limit(300); + $buffer = fread($handle, $chunksize); + echo $buffer; + flush(); + } + fclose($handle); +} +else +{ + readfile($realpath); +} + +exit(); +?>