Open guilhermej opened 6 years ago
same problem here with Django version: 2.10 . tusjs client which is working correctly with nodejs server given by tus but not working with django server .
I was able to make it work in the local Django server by editing the code in patch method in the views.py
:
finally:
file.seek(file_offset)
file.write(request.body)
file.close()
I add the line chunk_size = len(request.body)
The final code is this:
finally:
file.seek(file_offset)
file.write(request.body)
chunk_size = len(request.body)
file.close()
This is working just in the local Django server, but this not work in Apache/WSGI production server, because when pause the upload, the connection is closed and Django raises a UnreadablePostError, and the patch method is not called, so I will try in another type of server like a Nginx/Gunicorn.
P.S.: I'm using the GIT code, not the pip module.
I'm trying to use your module with my Django and Uppy like the frontend uploader, using the TUS protocol. The upload is OK, but when I try to pause and resume the upload something wrong happens, the upload of the file restarts from beginning. The behavior I can notice is:
Can you help me to find the problem?