1 #!/usr/bin/env python 2 3 import cgi 4 5 print('Content-type: text/plain') 6 print('') 7 8 form = cgi.FieldStorage() 9 10 print('Filename: %s' % form['up'].filename) 11 print('Name: %s' % form['name'].value) 12 print('Content: %s' % form['up'].file.read()) 13