mirror of
https://github.com/akuker/RASCSI.git
synced 2024-06-10 17:29:35 +00:00
Clean up tmp file before attempting to upload again
This commit is contained in:
parent
b5ec4e7f9c
commit
7a197d6754
|
@ -1066,6 +1066,10 @@ def upload_file():
|
||||||
if path.exists(save_path) and current_chunk == 0:
|
if path.exists(save_path) and current_chunk == 0:
|
||||||
return make_response(_("The file already exists!"), 400)
|
return make_response(_("The file already exists!"), 400)
|
||||||
|
|
||||||
|
if path.exists(tmp_save_path) and current_chunk == 0:
|
||||||
|
log.info("Temporary file found; deleting before downloading again...")
|
||||||
|
file_cmd.delete_file(tmp_save_path)
|
||||||
|
|
||||||
try:
|
try:
|
||||||
with open(tmp_save_path, "ab") as save:
|
with open(tmp_save_path, "ab") as save:
|
||||||
save.seek(int(request.form["dzchunkbyteoffset"]))
|
save.seek(int(request.form["dzchunkbyteoffset"]))
|
||||||
|
|
Loading…
Reference in New Issue
Block a user