Login to download the latest version of Mint and your favorite Pepper, purchase additional licenses, or post in the Forum. Don't have an account? Create one!

In Partnership with Media Temple

Mint Forum

Downloads Pepper: "...file is damaged..."

Calling Till!

Downloads Pepper is awesome but I’m having mixed results with certain downloads appearing to be corrupt.

I’m using htaccess to force a redirect:

<FilesMatch “.(zip|gzip|rar|tar.gz|pdf)$”>

RewriteCond %{REQUEST_FILENAME} -f

RewriteRule ^(.*)$ /mint1/pepper/tillkruess/downloads/tracker.php?url=http://%{HTTP_HOST}%{REQUEST_URI}&force [NC]

</FilesMatch>

which initiates the download, and tracks the download OK.

With certain pdf’s (It seems to be larger ones - I’ve just tried one over 30MB) I get an error when I try to open the downloaded file: “There was an error opening this document. The file is damaged and could not be repaired”

Any ideas what could be happening here? I hope there’s a solution to this as the download tracker is a great addition to mint

additional information:

When I test with zip files, the downloaded zip extracts an archive with the same name and a .cpgz extension, which then extracts the original zip file, and repeat.

I’ve considered using the automatic redirection option but I cant seem to get this to track anything - and it doesn’t suit my requirements for multi-site tracking in the same DB.

Any suggestions greatly appreciated…

Till
Third-Party Pepper Developer
Posted on Jul 16, '09 at 06:55 am

Mhh okay, one problem is that with the ´´&force´´ parameter mint completely reads the file which results a lot of server load. I fixed this in the latest 2.22 version. Try this one.

If this doesn’t help, please try another method or combination without the &force parameter. I personally love to abuse the ´´&remote´´ parameter, but be careful with it ; )

Thanks for replying Till,

I forgot to mention that I am using v222 already.

I’ve tried removing &force but this results in a report of an infinite loop, I’m not quite sure how you mean the &remote parameter should be used, I’ve tried using it in place of &force but it also results in an infinite loop occurring (or at least my browser reporting this is the case).

I feel like I’ve exhausted all my options when it comes to tweaking and testing with this one

If I remove the rules completely from the htaccess file and place domain.co.uk/capitan/mint1/pepper/tillk … cument.pdf in my address bar it downloads and tracks the file without any issues. If I use domain.co.uk/capitan/mint1/pepper/tillk … .pdf&force the original problem occurs.

Do you have any other suggestions?

You must be logged in to reply. Login above or create an account