My PHP script serves files using readfile() and manually added HTTP headers. Files are about ~1 MB big, so no partial-reading is necessary.
What is the best way to replace this file with a updated one, but ensure already started downloads won’t be broken? I’d like pending downloads to be finished with fetched old file version.
Platform: Linux, PHP 5, Apache 2.
Use version numbering in the filename:
e.g.
file0001.pdf
file0002.pdf
file0003.pdf
C.