coppermine-gallery.com/forum

Support => cpg1.4.x Support => Older/other versions => cpg1.4 miscellaneous => Topic started by: adrianbj on September 28, 2007, 11:28:40 PM

Title: Fix for downloading of lightbox zip in Safari
Post by: adrianbj on September 28, 2007, 11:28:40 PM
Just wanted to let you all know that currently if you try to download the contents of the lightbox (or whatever it is called in the default installation) as a zip file with Safari (on Windows at least, not sure about Mac), then it will get downloaded as zipdownload.php, instead of pictures.zip

This is easily fixed by changing (in archive.php):

@header("Content-disposition: attachment; filename=$filename");

to:

@header('Content-Disposition: attachment; filename="' . $filename . '"');

Hope that helps everyone!
Title: Re: Fix for downloading of lightbox zip in Safari
Post by: Nibbler on September 28, 2007, 11:50:21 PM
Why are double quotes needed around the filename? The RFC does not require this.
Title: Re: Fix for downloading of lightbox zip in Safari
Post by: adrianbj on September 28, 2007, 11:54:59 PM
Nibbler,

I honestly don't know why they are required - I haven't looked into it. All I know is that it works like this and doesn't the other way it doesn't.
Title: Re: Fix for downloading of lightbox zip in Safari
Post by: Nibbler on September 29, 2007, 12:30:15 AM
Quote from: adrianbj on September 28, 2007, 11:54:59 PM
All I know is that it works like this and doesn't the other way it doesn't.

That sentence don't make no sense it doesn't.
Title: Re: Fix for downloading of lightbox zip in Safari
Post by: adrianbj on September 29, 2007, 12:35:25 AM
Yeah, I am real smart I am   ;D