summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xfbin.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/fbin.py b/fbin.py
index 7667414..726a87c 100755
--- a/fbin.py
+++ b/fbin.py
@@ -237,6 +237,8 @@ class Application(object):
tempfile.tempdir = settings.file_directory
form = FileUploadFieldStorage(fp = environ['wsgi.input'], environ = environ)
if environ['REQUEST_METHOD'] != 'POST' or not 'file' in form or not 'filename' in form:
+ if 'file' in form:
+ form['file'].file.delete = True
start_response('200 OK', [('Content-Type', 'text/html')])
return str(templates.upload(searchList = {'root': settings.virtual_root, 'user': user}))