in reply to Re^3: printing file downloads
in thread printing file downloads
That is what I need to do, is tell if the file is binary or text so I can print the correct way.my $filename = "file.gif"; my $filepath = "/path/to/"; if(-e "$filepath$filename") { my $_binCheck = is_file_binary("$filepath$filename"); if($_binCheck && $_binCheck == 1) { # print header for download and then open the file in binary mode +and print to window for the attachment } else { # print header for download and open the file normally and print t +o window for the attachment } } else { die "File does not exist: $filepath$filename"; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^5: printing file downloads
by Marshall (Canon) on Dec 23, 2010 at 19:27 UTC | |
|
Re^5: printing file downloads
by Anonymous Monk on Dec 23, 2010 at 19:31 UTC | |
by Anonymous Monk on Dec 24, 2010 at 05:27 UTC |