File: upload.htm

package info (click to toggle)
libembperl-perl 2.5.0-4%2Bdeb8u1
  • links: PTS, VCS
  • area: main
  • in suites: jessie
  • size: 6,200 kB
  • ctags: 3,072
  • sloc: ansic: 21,387; perl: 14,496; cpp: 467; xml: 49; makefile: 32; sh: 24
file content (56 lines) | stat: -rwxr-xr-x 1,294 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56

<html>
<head>
<title>Embperl Tests - File-Upload</title>
</head>
[!
use Data::Dumper ;
!]
<h1>Embperl Tests - File-Upload</h1>

[+ do { $cgiok = $CGI::VERSION > 2.45; $cgi4 = $CGI::VERSION >= 4; @info = sort keys %{$fdat{-upload}} ; ($cgiok||$cgi4)?"@info":'Content-Disposition Content-Type' } +]
Filename:       [+ $cgiok?$fdat{upload}:'upload-filename' +]<br>
Content-Type:	[+ $cgiok?$fdat{-upload} -> {'Content-Type'}:'test/plain' +]<br>
CGI-Version:    [+ $CGI::VERSION +]
cgiok           [+ $cgiok +]
filehandle:	[+ ref $fdat{upload} +]
Info:		[+ join ("\n", map { "$_ = $fdat{-upload}{$_}" } sort keys %{$fdat{-upload}}) +]
[- 
	$no = 1 ;
	while ($size = read($fdat{upload}, $buffer, 2048))
		{
		$buf .= $buffer ;
		print OUT 'no:   ', $no++, "\n"  ;
		print OUT 'size: ', $size, "\n" ;
		}
-]
buflen:         [+ length($buf) +]

Your file has the content
----------
[+ $buf +]
----------

<hr>

content: [+ $fdat{content} +] <br>

multval: [+ join (';', split ("\t", $fdat{multval})) +] <br>

single: [+ $fdat{single} +] <br>

<br>

[#
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' } +]
#]
<p><hr>

<small>HTML::Embperl (c) 1997-1998 G.Richter</small>

</body>
</html>