diff options
| author | 2011-02-05 22:59:54 +0100 | |
|---|---|---|
| committer | 2011-02-05 22:59:54 +0100 | |
| commit | ff7d460b120ce987be93fc242b0447f85c00c759 (patch) | |
| tree | 972020abaaf096ef3f085690840c8d0857cb983e | |
| parent | setup fix (diff) | |
| download | pyload-ff7d460b120ce987be93fc242b0447f85c00c759.tar.xz | |
webif dlc upload fix
| -rw-r--r-- | module/web/json_app.py | 6 | 
1 files changed, 3 insertions, 3 deletions
| diff --git a/module/web/json_app.py b/module/web/json_app.py index 2c95eaf5b..12b7fa8ce 100644 --- a/module/web/json_app.py +++ b/module/web/json_app.py @@ -4,6 +4,7 @@  import base64  from os.path import join  from traceback import print_exc +from shutil import copyfileobj  from bottle import route, request, HTTPError, validate @@ -220,10 +221,9 @@ def add_package():          if name is None or name == "":              name = f.name -        fpath = join(PYLOAD.get_conf_val("general", "download_folder"), "tmp_" + f.name) +        fpath = join(PYLOAD.get_conf_val("general", "download_folder"), "tmp_" + f.filename)          destination = open(fpath, 'wb') -        for chunk in f.chunks(): -            destination.write(chunk) +        copyfileobj(f.file, destination)          destination.close()          links.insert(0, fpath)      except: | 
