mirror of
https://github.com/akuker/RASCSI.git
synced 2024-06-10 02:29:33 +00:00
Log chunk stats for uploading
This commit is contained in:
parent
7a197d6754
commit
bff43be3c2
|
@ -1072,8 +1072,13 @@ def upload_file():
|
|||
|
||||
try:
|
||||
with open(tmp_save_path, "ab") as save:
|
||||
log.info(request.form)
|
||||
log.info(request.files)
|
||||
save.seek(int(request.form["dzchunkbyteoffset"]))
|
||||
save.write(file_object.stream.read())
|
||||
chunk = file_object.stream.read()
|
||||
# Remove CRLF characters from the end of the chunk
|
||||
# chunk = chunk.rstrip(b"\r\n")
|
||||
save.write(chunk)
|
||||
except OSError:
|
||||
log.exception("Could not write to file")
|
||||
return make_response(_("Unable to write the file to disk!"), 500)
|
||||
|
|
Loading…
Reference in New Issue
Block a user