File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change 77
77
$ deleteIndex = validInt ($ _REQUEST ['deleteIndex ' ]);
78
78
unlink ($ videoFiles [$ deleteIndex ]);
79
79
unset($ videoFiles [$ deleteIndex ]);
80
- }
81
-
82
- if ( isset ($ _REQUEST ['downloadIndex ' ]) ) {
83
- // can't be output buffering, as this file might be large
84
- ob_end_clean ();
80
+ } else if (isset ($ _REQUEST ['downloadIndex ' ])) {
85
81
$ downloadIndex = validInt ($ _REQUEST ['downloadIndex ' ]);
86
82
ZM \Debug ("Download $ downloadIndex, file: " . $ videoFiles [$ downloadIndex ]);
87
83
header ('Pragma: public ' );
93
89
header ('Content-Transfer-Encoding: binary ' );
94
90
header ('Content-Type: application/force-download ' );
95
91
header ('Content-Length: ' .filesize ($ videoFiles [$ downloadIndex ]));
92
+ // can't be output buffering, as this file might be large
93
+ while (ob_get_level ()) {
94
+ ob_end_clean ();
95
+ }
96
+ set_time_limit (0 );
96
97
readfile ($ videoFiles [$ downloadIndex ]);
97
98
exit ;
98
99
}
You can’t perform that action at this time.
0 commit comments