Advanced search  

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Pages: [1]   Go Down

Author Topic: Fix for downloading of lightbox zip in Safari  (Read 3406 times)

0 Members and 1 Guest are viewing this topic.

adrianbj

  • Contributor
  • Coppermine novice
  • ***
  • Offline Offline
  • Posts: 34
Fix for downloading of lightbox zip in Safari
« 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):

Code: [Select]
@header("Content-disposition: attachment; filename=$filename");
to:

Code: [Select]
@header('Content-Disposition: attachment; filename="' . $filename . '"');
Hope that helps everyone!
Logged

Nibbler

  • Guest
Re: Fix for downloading of lightbox zip in Safari
« Reply #1 on: September 28, 2007, 11:50:21 pm »

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

adrianbj

  • Contributor
  • Coppermine novice
  • ***
  • Offline Offline
  • Posts: 34
Re: Fix for downloading of lightbox zip in Safari
« Reply #2 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.
Logged

Nibbler

  • Guest
Re: Fix for downloading of lightbox zip in Safari
« Reply #3 on: September 29, 2007, 12:30:15 am »

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.
Logged

adrianbj

  • Contributor
  • Coppermine novice
  • ***
  • Offline Offline
  • Posts: 34
Re: Fix for downloading of lightbox zip in Safari
« Reply #4 on: September 29, 2007, 12:35:25 am »

Yeah, I am real smart I am   ;D
Logged
Pages: [1]   Go Up
 

Page created in 0.016 seconds with 19 queries.