handle no file being uploaded cleanly

This commit is contained in:
Damien Churchill 2009-04-02 18:57:41 +00:00
parent 061c06a164
commit df6a905226

View file

@ -106,6 +106,10 @@ class Upload(resource.Resource):
request.setResponseCode(http.NOT_ALLOWED)
return ""
if "file" not in request.args:
request.setResponseCode(http.OK)
return ""
tempdir = os.path.join(tempfile.gettempdir(), "delugeweb")
if not os.path.isdir(tempdir):
os.mkdir(tempdir)