Re: Download Fetch [support thread]
Quote:
Q.1 A customer emails me and requests a product, I email them a link to the download request form, they then fill in the download request form and are then sent an email with the download link - I hope I got that right...hehehe.
That will work. You are just adding a step with the customer asking for the download link.
Quote:
Q.2 Just running through a test, everything works up to the point of actually downloading the file. I am receiving an IE error when I click on the download link - error:unable to download from this site - cannot find index.php.
But no download issues when using Safari, file downloads and extracts just fine.
Would you be aware of a work around for IE or something I need to change in my IE settings.
What are the file extensions of the files that are being downloaded?
Based on the file extension is how fetch handles the header for the download. And IE handles the header info differently then the rest of the browser world.
Skip
Re: Download Fetch [support thread]
Quote:
Originally Posted by
skipwater
That will work. You are just adding a step with the customer asking for the download link.
Thanks for the fast response Skip much appreciated :). OK confession time, after reading the instructions for the 20th time I finally got how the mod is supposed to work from start to finish :embarrassed: One should get more sleep before attempting the simplist tasks!
Quote:
Originally Posted by
skipwater
What are the file extensions of the files that are being downloaded?
Based on the file extension is how fetch handles the header for the download. And IE handles the header info differently then the rest of the browser world.
Skip
Aaaah MS where would we be without your challenges...lol. All files are winzip files so switching to winrar is not an option for me unfortunately. I have done a quick google on this error but I don't understand most of what I am reading. Any suggestions would be helpful :)
Re: Download Fetch [support thread]
This error seems to come up more then expected. I will try and explain a fix workaround.
These are the basic content type header setting for downloading files.
application/x-octet-stream
application/force-download
application/octet-stream
application/download
With fetch we create a content type header that matches the file type ie.
test_zip_file.zip would match -> $content_type="application/zip"
OK you are getting a bad zip file when downloaded.
To fix this you can change the content type that is assigned to the file extension ie.
Code:
case "zip": $content_type="application/zip"; break;
to
Code:
case "zip": $content_type="application/x-octet-stream"; break;
Now download the zip file again and see if that content type change fixed the issue. If not change the content type till it works.
Here is the fetch file that needs to be edited /includes/classes/fetch_download.php at line 52 you will find this switch statement.
Code:
switch( $file_extension ) { // the file type
// Application files
case "pdf": $content_type="application/pdf"; break;
case "exe": $content_type="application/octet-stream"; break;
case "zip": $content_type="application/zip"; break;
case "doc": $content_type="application/msword"; break;
case "xls": $content_type="application/vnd.ms-excel"; break;
case "ppt": $content_type="application/vnd.ms-powerpoint"; break;
// Image files
case "gif": $content_type="image/gif"; break;
case "png": $content_type="image/png"; break;
case "jpeg":
case "jpg": $content_type="image/jpg"; break;
// Audio files
case "mp3": $content_type="audio/mpeg"; break;
case "wma": $content_type="audio/x-ms-wma";break;
case "wav": $content_type="audio/x-wav"; break;
// Video files
case "mpeg":
case "mpe":
case "mpg": $content_type="video/mpeg"; break;
case "avi": $content_type="video/x-msvideo"; break;
case "wmv": $content_type="video/x-ms-wmv";break;
case "mov": $content_type="video/quicktime"; break;
//The following are for extensions that shouldn't be downloaded (sensitive stuff, like php files)
case "php":
case "htm":
case "html":
case "cgi": die("<h1>ERROR: Disallowed use for ". $file_extension ." files!</h1>"); break;
default: $content_type="application/force-download";
}
Hope that helped.
Skip
Re: Download Fetch [support thread]
You’re a legend Skip, thank you so much for the very clear instructions ^_^
application/x-octet-stream – worked like a treat. Tested IE and Safari both downloads and extraction - zero issues.
Excellent Mod so very happy I found this one!
Re: Download Fetch [support thread]
Aawww seems like I spoke too soon :(
My inital winzip file downloaded and extracted just fine 1.05mb using IE & Safari.
But after a bit of playing I have found that any winzip file larger than 4.5 mb doesn't download correctly in either browser, being 1kb short resulting in a corrupt file.
I tried each one of the content type header settings too.
Would you have any other suggestions Skip? apart from converting to rar files that is ...hehehehe
Re: Download Fetch [support thread]
Quote:
Originally Posted by
SammyD
Would you have any other suggestions Skip? apart from converting to rar files that is ...hehehehe
It might come down to may math.
Again open this fetch file that needs to be edited /includes/classes/fetch_download.php around line 140 you will find this.
Code:
// ... else, download the whole file
} else {
$byte_from = 0;
$byte_to = $this->properties["size"] - 1;
Change by removing the - 1 so it looks like this.
Code:
// ... else, download the whole file
} else {
$byte_from = 0;
$byte_to = $this->properties["size"];
That should have fixed it.
Skip
Re: Download Fetch [support thread]
Thanks Skip for the reply, unfortunately it didn't work.
I did play with the code a little bit to see if I could get it to work, but no go.
Such a shame as I think this is a great mod which I could use quite a bit but most of my files are 10mb or more. Never mind, at least I can still use it for files 4.5mb and under.
Again thanks for the help ^_^
Re: Download Fetch [support thread]
Has the corrupted file downloads issue been resolved? Like several of the others, all seems to work fine, with the exception that the files downloaded are corrupted. They are fine on the server itself.
Re: Download Fetch [support thread]
Quote:
Originally Posted by
filmfr3ak
Has the corrupted file downloads issue been resolved? Like several of the others, all seems to work fine, with the exception that the files downloaded are corrupted. They are fine on the server itself.
Sorry for the delay in my response I was working on that issue before your post but it got set aside till your post reminded me.
I have added to the code so there should be no issues with the size of the files or corruption.
I have tested it on XP, Vista, IE 5,6,7,8 FireFox and have gotten no errors.
I have submitted version 1.3 to the Free Software Add Ons area it should be updated in a couple of days. Till then here is a link to Version 1.3
To install read the readme file in the zip.
If you where running version 1.2 you do not need to run the sql install.
Skip
Re: Download Fetch [support thread]
Quote:
Originally Posted by
skipwater
Sorry for the delay in my response I was working on that issue before your post but it got set aside till your post reminded me.
I have added to the code so there should be no issues with the size of the files or corruption.
I have tested it on XP, Vista, IE 5,6,7,8 FireFox and have gotten no errors.
I have submitted version 1.3 to the Free Software Add Ons area it should be updated in a couple of days. Till then here is a link to
Version 1.3
To install read the readme file in the zip.
If you where running version 1.2 you do not need to run the sql install.
Skip
Hi Skip,
Just installed the new package. Now when someone clicks the link in the email it opens a white webpage and nothing happens. :blink:
Any ideas?
thanks.