CGI-Easy-SendFile
view release on metacpan or search on metacpan
my $data = send_file($r, $h, '/path/file.zip');
print $h->compose();
print ${$data};
# -- send "file" generated in memory instead of real file
my $dynamic_file = 'â¦some binary dataâ¦';
my $data = send_file($r, $h, \$dynamic_file);
# -- simulate static image served by web server
# (without "download file" dialog popup in browser)
my $data = send_file($r, $h, 'avatar.png', {
type => 'image/png',
cache => 1,
inline => 1,
});
DESCRIPTION
This module provide single function, which helps you prepare CGI reply
for sending file to browser.
lib/CGI/Easy/SendFile.pm view on Meta::CPAN
my $data = send_file($r, $h, '/path/file.zip');
print $h->compose();
print ${$data};
# -- send "file" generated in memory instead of real file
my $dynamic_file = 'â¦some binary dataâ¦';
my $data = send_file($r, $h, \$dynamic_file);
# -- simulate static image served by web server
# (without "download file" dialog popup in browser)
my $data = send_file($r, $h, 'avatar.png', {
type => 'image/png',
cache => 1,
inline => 1,
});
=head1 DESCRIPTION
This module provide single function, which helps you prepare CGI reply for
( run in 2.284 seconds using v1.01-cache-2.11-cpan-364913b4093 )