if (can_send($file)) { # we assume you can program whatever rules you +need here open(INP,"<$file") || die "Can not open $file:$!\n"; # but handle t +hat in can_send my MIME::Types $types = MIME::Types->new; my $mime = $types->mimeTypeOf($file) || "application/octet-stream"; print header("Content-type: $mime"); binmode(INP); binmode(STDOUT); while (<INP>) { print $_; } close(INP); }
In reply to Re: How to send a file vith apache?
by matija
in thread How to send a file vith apache?
by pcouderc
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |