Fix for downloading of lightbox zip in Safari Fix for downloading of lightbox zip in Safari
 

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Main Menu

Fix for downloading of lightbox zip in Safari

Started by adrianbj, September 28, 2007, 11:28:40 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

adrianbj

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!

Nibbler

Why are double quotes needed around the filename? The RFC does not require this.

adrianbj

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.

Nibbler

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.

adrianbj