File: form.cgi

package info (click to toggle)
paste 1.7.1-1%2Blenny1
  • links: PTS, VCS
  • area: main
  • in suites: lenny
  • size: 2,132 kB
  • ctags: 2,681
  • sloc: python: 20,173; sh: 73; makefile: 50
file content (12 lines) | stat: -rwxr-xr-x 216 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
#!/usr/bin/env python

import cgi

print 'Content-type: text/plain'
print

form = cgi.FieldStorage()

print 'Filename:', form['up'].filename
print 'Name:', form['name'].value
print 'Content:', form['up'].file.read()