Thread Download mittels -type=>'application/octet-stream' (7 answers)
Opened by bieber at 2009-01-16 10:50

GwenDragon
 2009-01-16 11:08
#118062 #118062
User since
2005-01-17
14761 Artikel
Admin1
[Homepage]
user image
Code: (dl )
1
2
3
4
5
6
7
8
9
10
my $db = $cgi->url_param('db');
my $datei = $cgi->url_param('datei');

download("/fester_pfad/".$db."/".$datei);

sub download {
my $file = shift;
my $fn = (split "/", $file)[-1];
print $cgi->header(-type=>'application/octet-stream',-attachment=>$fn);
}

View full thread Download mittels -type=>'application/octet-stream'