Can't download ZIP's! Can't download ZIP's!
 

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]

Main Menu

Can't download ZIP's!

Started by PCGUY112887, September 24, 2004, 06:13:49 PM

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.

PCGUY112887

I have uploaded a bunch of ZIP's of videos to my gallery...
http://www.spudfiles.com/gallery
And I just now noticed I can't download any of them!  When I click on the ZIP icon it says...
The image "http://www.spudfiles.com/gallery/wm.php?pid=44&mode=fullsize" cannot be displayed, because it contains errors.

That is with Firefox.  If I try IE it just brings up the page and it says...
1

That's it :p
I tryed to right click and download.. but it just downloads a text file... saying "1" :p
Any clue?  Everything else works on my gallery becides this.. I dunno how I missed this problem!

BTW this happens if i'm logged in, or logged out, or in admin mode, or in user mode.  And I checked with FTP and all of the ZIP's are actually there :-/

Nibbler

I expect it's because the gallery is watermarking the zip files. You'd need to setup the watermarking code to only affect image files

PCGUY112887

#2
Ah IC... any ideas on how to do that? :p
Here is my wm.php...

<?
define('IN_COPPERMINE'true);
require(
'include/init.inc.php');

header('Content-Type: image/jpeg');
header('Content-Disposition: inline; filename=file.jpg');

$pid $_REQUEST["pid"];
$mode $_REQUEST["mode"];

$sql "SELECT * FROM ".$CONFIG['TABLE_PREFIX']."pictures WHERE pid=$pid";
$db mysql_connect($CONFIG['dbserver'], $CONFIG['dbuser'], $CONFIG['dbpass']);
mysql_select_db($CONFIG['dbname'], $db);


$result mysql_query($sql$db);
$row mysql_fetch_array($result);

$pic_prefix = array(
   
'thumb' => $CONFIG['thumb_pfx'],
   
'normal' => $CONFIG['normal_pfx'],
   
'fullsize' => ''
);


$cmd "{$CONFIG['impath']}composite -compose over -gravity Southeast \"".realpath("./watermark.png")."\" \"".realpath('./'.$CONFIG["fullpath"].$row["filepath"].$pic_prefix[$mode].$row["filename"])."\" jpg:-";

passthru ($cmd$output);

echo 
$output;
?>

Tranz

How much/often do you upload? If it's not too often, you could disable automatic watermarking, and then manually watermark the albums you want to have watermarked. Then, you don't have to touch the code.

PCGUY112887

Uploading would be done very often... it's not often right now because I haven't released the gallery yet.