mirror of
https://git.deluge-torrent.org/deluge
synced 2025-08-03 15:08:40 +00:00
handle no file being uploaded cleanly
This commit is contained in:
parent
061c06a164
commit
df6a905226
1 changed files with 4 additions and 0 deletions
|
@ -106,6 +106,10 @@ class Upload(resource.Resource):
|
||||||
request.setResponseCode(http.NOT_ALLOWED)
|
request.setResponseCode(http.NOT_ALLOWED)
|
||||||
return ""
|
return ""
|
||||||
|
|
||||||
|
if "file" not in request.args:
|
||||||
|
request.setResponseCode(http.OK)
|
||||||
|
return ""
|
||||||
|
|
||||||
tempdir = os.path.join(tempfile.gettempdir(), "delugeweb")
|
tempdir = os.path.join(tempfile.gettempdir(), "delugeweb")
|
||||||
if not os.path.isdir(tempdir):
|
if not os.path.isdir(tempdir):
|
||||||
os.mkdir(tempdir)
|
os.mkdir(tempdir)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue