Commit 93d61151 authored by Frédéric Escudié's avatar Frédéric Escudié
Browse files

Fix python3 bug in upload with small file.

parent d40da814
......@@ -60,8 +60,8 @@ class UploadFieldStorage(cgi.FieldStorage):
if not os.path.exists( tmp_folder ):
try : os.mkdir(tmp_folder)
except : pass
fh = open(os.path.join(tmp_folder, self.filename), "w+")
fh_name = fh.name
fh = open(os.path.join(tmp_folder, self.filename), "wb+")
fh_name = fh.name
fh.write(self.file.getvalue())
fh.close()
return fh_name
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment