diff options
-rw-r--r-- | uploader/files/views.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/uploader/files/views.py b/uploader/files/views.py index 7e2ef0b..cd0c188 100644 --- a/uploader/files/views.py +++ b/uploader/files/views.py @@ -26,6 +26,14 @@ def resumable_upload_get(): "statuscode": 400 }), 400 + # If the complete target file exists, return 200 for all chunks. + if target_file(fileid).exists(): + return jsonify({ + "chunk": chunk, + "message": "The complete file already exists.", + "statuscode": 200 + }), 200 + if Path(chunks_directory(fileid), chunk_name(filename, chunk)).exists(): return jsonify({ |