1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-11-03 08:07:17 -05:00

upload test: Display filename.

This commit is contained in:
Witold Filipczyk 2008-05-03 12:08:54 +02:00 committed by Witold Filipczyk
parent 43036aec73
commit 0b2edbd33a

View File

@ -2,7 +2,7 @@
import md5 import md5
import cgi import cgi
print "Content-Type: text/plain\r\n\r\n" print "Content-Type: text/plain\r\n"
form = cgi.FieldStorage() form = cgi.FieldStorage()
if form.has_key("file"): if form.has_key("file"):
plik = form["file"] plik = form["file"]
@ -16,5 +16,6 @@ if form.has_key("file"):
length += len(data) length += len(data)
dig.update(data) dig.update(data)
print "Filename = " + plik.filename
print "Size = %d" % length print "Size = %d" % length
print "MD5=" + dig.hexdigest() print "MD5 = " + dig.hexdigest()