MDL-38194 Files: Allow download of large backup files
authorsam marshall <s.marshall@open.ac.uk>
Tue, 10 Sep 2013 15:34:44 +0000 (16:34 +0100)
committersam marshall <s.marshall@open.ac.uk>
Fri, 13 Sep 2013 13:59:57 +0000 (14:59 +0100)
commit137885b7e9d90d8709ade3c727f6f08631bd8966
treedfbf75a78aabbd88af92b4f20d4f2e69ffdd02e8
parent83f26f640738a3e4de89d1765c66e4ceeb8503a8
MDL-38194 Files: Allow download of large backup files

The PHP readfile function does not work for files more than 2GB.
This commit provides a wrapper that can be used so that files less
than 2GB are sent with readfile, and files larger than 2GB are
sent manually.

The change applies to all uses of pluginfile.php, although in
reality, backup files are probably the only ones likely to be more
than two gigabytes.
lib/filelib.php
lib/filestorage/stored_file.php
lib/upgrade.txt