Leser: 1
![]() |
|< 1 2 >| | ![]() |
14 Einträge, 2 Seiten |
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
##################################
sub send_file_to_browser {
##################################
my $dest = shift;
my $file;
local $_;
chomp $$dest;
$$dest =~ s/\\/\//g;
($file = (split /\//, $$dest)[-1]) =~ s/\s/_/g;
binmode STDOUT;
print "Content-Type: application/*\n";
print "Content-Disposition: inline; filename=\"$file\"\n\n";
open FILE, "< $$dest" or die("File $file couldn't be opened");
binmode FILE;
print while <FILE>;
close FILE or die("File $file couldn't be closed");
}
1
2
3
4
5
6
image/bmp bmp
image/gif gif base64
image/ief ief base64
image/jpeg jpeg,jpg,jpe base64
image/png png base64
image/tiff tiff,tif base64
print "Content-Disposition: attachment; filename=\"$name\"\n";
![]() |
|< 1 2 >| | ![]() |
14 Einträge, 2 Seiten |