mirror of
https://git.deluge-torrent.org/deluge
synced 2025-04-21 12:04:51 +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)
|
||||
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)
|
||||
|
|
Loading…
Add table
Reference in a new issue