It seems like the problem is here:
if (DOWNLOAD_BY_REDIRECT != 'true' or $link_create_status==false ) {
// not downloading by redirect; instead, we stream it to the browser. This happens if the symlink couldn't happen, or if set as default in Admin
if (DOWNLOAD_IN_CHUNKS != 'true') {
// This will work on all systems, but will need considerable resources
header("Content-Length: " . $zv_filesize);
$zco_notifier->notify('NOTIFY_DOWNLOAD_WITHOUT_REDIRECT___COMPLETED');
readfile(DIR_FS_DOWNLOAD . $downloads->fields['orders_products_filename']);
} else {
// loop with fread($fp, xxxx) to allow streaming in chunk sizes below the PHP memory_limit
header("Content-Length: " . $zv_filesize);
$handle = fopen(DIR_FS_DOWNLOAD . $downloads->fields['orders_products_filename'], "rb");
while (!feof($handle)) {
echo(fread($handle, 4096));
flush();
}
fclose($handle);
$zco_notifier->notify('NOTIFY_DOWNLOAD_WITHOUT_REDIRECT_VIA_CHUNKS___COMPLETED');
}
}
If I try to remove this the file i damaged and cant be opened at all. If I copy the code from the other file (the one from your link) it is damaged too.
I I let the code be as it is I got the same problem as described in the beginning.
Download by redirect is set to false
Download by streaming is set to false
I hope you have the time to help, and thank you for all the time you have used to help me.
Kind Regards :)