Embperl Tests - File-Upload
[+ do { $cgiok = $CGI::VERSION > 2.45 ; @info = sort keys %{$fdat{-upload}} ; $cgiok?"@info":'Content-Disposition Content-Type' } +]
Filename: [+ $cgiok?$fdat{upload}:'upload-filename' +]
Content-Type: [+ $cgiok?$fdat{-upload} -> {'Content-Type'}:'test/plain' +]
CGI-Version: [+ $CGI::VERSION +]
cgiok [+ $cgiok +]
[-
$buf .= $buffer while read($fdat{upload}, $buffer, 32768);
-]
Your file has been the content
----------
[+ $buf +]
----------
content: [+ $fdat{content} +]
multval: [+ join (';', split ("\t", $fdat{multval})) +]
single: [+ $fdat{single} +]
[#
eval 'use IO::Handle' ;
$h = undef ;
eval '$h = IO::Handle -> new_from_fd (fileno ($fdat{upload}), "r")' ;
-]
[+ if ($h) { @s = $h -> stat ; $s[7]} else { '8219' } +]
#]
HTML::Embperl (c) 1997-1998 G.Richter