diff options
Diffstat (limited to 'uploader/files/views.py')
-rw-r--r-- | uploader/files/views.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/uploader/files/views.py b/uploader/files/views.py index 10d52d4..8d81654 100644 --- a/uploader/files/views.py +++ b/uploader/files/views.py @@ -27,8 +27,11 @@ def resumable_upload_get(): }), 400 # If the complete target file exists, return 200 for all chunks. - if target_file(fileid).exists(): + _targetfile = target_file(fileid) + if _targetfile.exists(): return jsonify({ + "uploaded-file": _targetfile.name, + "original-name": filename, "chunk": chunk, "message": "The complete file already exists.", "statuscode": 200 @@ -74,6 +77,7 @@ def resumable_upload_post(): if _targetfile.exists(): return jsonify({ "uploaded-file": _targetfile.name, + "original-name": _uploadfilename, "message": "File was uploaded successfully!", "statuscode": 200 }), 200 @@ -93,6 +97,7 @@ def resumable_upload_post(): chunks_directory(_fileid).rmdir() return jsonify({ "uploaded-file": _targetfile.name, + "original-name": _uploadfilename, "message": "File was uploaded successfully!", "statuscode": 200 }), 200 |