Page 1 of 2
Downloads not able to resume
Posted: 04 Aug 2008, 09:50
by theunsd
Hi,
I have noticed that files downloaded via Phoca Download don't support resuming. When I download the same file directly form the server, resuming works perfectly. How can I fix this?
Re: Downloads not able to resume
Posted: 04 Aug 2008, 14:35
by Jan
Hi, Phoca Download gives the file to the browser and prevent it from execution (it will be provided to download by the browser), so I have no idea why the resumnig doesn't work
Jan
Re: Downloads not able to resume
Posted: 06 Aug 2008, 07:50
by theunsd
Hi,
I've fixed this issue. What basically happened was because that the file is dumped to the browser by using a READ() the browser and the download manager assumed that the file had dynamic content, and that's why it wouldn't allow resume. I changed the module to .redirect to the applicable file instead. Now the downloads support resume.
Re: Downloads not able to resume
Posted: 06 Aug 2008, 15:28
by Jan
Great to hear it, Jan
Re: Downloads not able to resume
Posted: 24 Aug 2008, 04:15
by pcwitchdoctor
theunsd wrote: I changed the module to .redirect to the applicable file instead. Now the downloads support resume.
I'm having the same problem, how exactly do I fix this. What do you mean by 'changed the module to .redirect', how/where do I do that?
Re: Downloads not able to resume
Posted: 25 Aug 2008, 21:50
by theunsd
Hi,
This is for v1.0.1. Please make backups first.
IN /components/com_phocadownload/views/category/view.html.php
Find:
Code: Select all
}else {
// Clears file status cache
clearstatcache();
$addHit = $model->hit($downloadId);
$fileWithoutPath = basename($absFile);
$fileSize = filesize($absFile);
// Clean the output buffer
ob_end_clean();
header("Cache-Control: public, must-revalidate");
header('Cache-Control: pre-check=0, post-check=0, max-age=0');
header("Pragma: no-cache");
header("Expires: 0");
header("Content-Description: File Transfer");
header("Expires: Sat, 30 Dec 1990 07:07:07 GMT");
header("Content-Type: " . (string)$mimeType);
header("Content-Length: ". (string)$fileSize);
header('Content-Disposition: attachment; filename="'.$fileWithoutPath.'"');
header("Content-Transfer-Encoding: binary\n");
@readfile($absFile);
exit;
}
Replace:
Code: Select all
}else {
//$relfolder = PhocaDownloadHelper::getSettings('download_folder', 'phocadownload' );
//$relfolder = str_replace(DS, '/', JPath::clean($relfolder))
$mainframe->redirect (PhocaDownloadHelper::getSettings('download_folder', 'phocadownload' ).'/'.$absFile);
exit;
}
IN /components/com_phocadownload/models/category.php
Find:
Code: Select all
if ($this->_filename !='') {
$absFile = str_replace('/', DS, JPath::clean($filePath['orig_abs_ds'] . $this->_filename));
Replace:
Code: Select all
if ($this->_filename !='') {
return $this->_filename;
Re: Downloads not able to resume
Posted: 25 Aug 2008, 23:21
by pcwitchdoctor
theunsd wrote:Hi,
This is for v1.0.1. Please make backups first.
Thanks for your help. I did the changes you posted above, now I get a 404 error. My downloaded files are in the phocadownload directory, but now when you click the download link, it gives the folling path:
The requested URL /downloads/category/phocadownload/FIA_GT_Championship_V1.0.exe was not found on this server.
"/downloads/category/" does not exist on my server, however, the file is in a Category called "Downloads", in a section called "rFactor Mods". The downloadable files are in /home/badc/domains/street-racers.info/public_html/phocadownload/
Re: Downloads not able to resume
Posted: 26 Aug 2008, 06:37
by theunsd
In your admin section:
Go to Components -> Phoca Download -> Settings
Whats the value of "Download Folder"?
Re: Downloads not able to resume
Posted: 26 Aug 2008, 07:01
by pcwitchdoctor
theunsd wrote:In your admin section:
Go to Components -> Phoca Download -> Settings
Whats the value of "Download Folder"?
It's set to phocadownload which was the download directory created when I installed the component and where all my downloadable files are.
Re: Downloads not able to resume
Posted: 26 Aug 2008, 07:33
by theunsd
Have you installed any SEO modules?