Previous Thread
Next Thread
Print Thread
Hop To
#43948 01/27/2005 9:33 AM
Joined: Jan 2005
Posts: 1
C
stranger
stranger
C Offline
Joined: Jan 2005
Posts: 1
Hi,

We are using UBB.Threads 6.4.1 and are having problems with some users who are trying to download files with the .zip extension from their parent posts. This does not happen to all users and there does not seem to be a pattern. It also only happens with zip files.

The user will click on the file download link and the IE browser will prompt the user to save the file. The file name provided however is always "download.php" rather than the correct filename. Interestingly, if you change the file name to a .zip filename, and save the file then the file is correctly saved as a zip file, so it seems that it is soley the naming aspect that is a problem.

Has anyone seen this before and have an idea of the remedy,

thanks for you assistance,

Chris

Joined: Jun 2006
Posts: 182
A
member
member
A Offline
Joined: Jun 2006
Posts: 182
What operating systems and browsers are those users using and do they have an application installed that handles zip file(winrar, winzip...)?

You could try the following, but I have no idea if it is going to work:

#### in download.php

## Search for:

$file = rawurlencode($file);

## Insert before:

$file_extension = strtolower(substr(strrchr($$file,"."),1));

switch( $file_extension ) {
case "zip": $ctype="application/zip"; break;
case "gif": $ctype="image/gif"; break;
case "png": $ctype="image/png"; break;
case "jpeg":
case "jpg": $ctype="image/jpg"; break;
}

header("Content-Type: $ctype");


Link Copied to Clipboard
ShoutChat
Comment Guidelines: Do post respectful and insightful comments. Don't flame, hate, spam.
Recent Topics
spam issues
by ECNet - 03/19/2024 11:45 PM
Looking for a forum
by azr - 03/15/2024 11:26 PM
Editing Links in Post
by Outdoorking - 03/15/2024 9:31 AM
Question on barkrowler and the like
by Mors - 02/29/2024 6:51 PM
Member Permissions Help
by domspeak - 02/27/2024 6:31 PM
Who's Online Now
3 members (rootman, Gizmo, Nightcrawler), 562 guests, and 186 robots.
Key: Admin, Global Mod, Mod
Random Gallery Image
Latest Gallery Images
Los Angeles
Los Angeles
by isaac, August 6
3D Creations
3D Creations
by JAISP, December 30
Artistic structures
Artistic structures
by isaac, August 29
Stones
Stones
by isaac, August 19
Powered by UBB.threads™ PHP Forum Software 8.0.0
(Preview build 20230217)