Quote:
Originally Posted by akenarf
//readfile($config['calibre_internal_directory'] . $file);
header('Content-Length: ' . filesize($config['calibre_internal_directory'] . $file));
fpassthru(fopen($config['calibre_internal_directory'] . $file, 'rb'));
not sure why this is the case, but it all works great now..! :-)
|
@Vlad59:
Whan patching this code, will this also work as a replacement for the code I needed to implement on my machine?
Quote:
Edit the file fetch.php and put // before the last two lines.
// header("Content-Type: application/force-download");
// header ($config['cops_x_accel_redirect'] . ": " . $config['calibre_internal_directory'] . $file);
Add this line below the lines above.
readfile($config['calibre_internal_directory'] . $file);
|
Maybe it is possible while patching to make the code more uniform and make this an optional feature, based on the choice of setting
Quote:
$config['cops_x_accel_redirect'] = "location";
|
If the option is generic I can do a Git Pull without the need of first saving my personal modification.