Closed morenosan closed 7 years ago
Did you check the read/write permissions?
Yes. In the following code:
def append_chunk(self, chunk, chunk_size=None, save=True):
self.file.close()
self.file.open(mode='ab') # mode = append+binary
First line closes the file. But the second line opens the file in read mode, not in 'ab' mode, as requested.
Same issue, with 1.1.2 and using runserver (Django 1.9.7):
File "<path_to_virtualenv>/lib/python3.5/site-packages/chunked_upload/models.py", line 69, in append_chunk
self.file.write(chunk.read())
io.UnsupportedOperation: write
I juste tested the 1.1.1 and it works.
Version 1.1.2 works with Django 1.11.0. Apparently it was due to this bug:
https://code.djangoproject.com/ticket/13809
Fixed by:
https://github.com/django/django/commit/ac1975b18b5a33234284bec86e5a5bb44a4af976
Thanks @kansch!
The problem was the Django version. Updating from 1.10 to 1.11 fixed the problem.
Hi!
Thank you for sharing this package. It's really useful.
I've found a problem upgrading to the 1.1.2 release. Using runserver works great, but at least on uWSGI and gunicorn, it fails with the following error just after receiving the first chunk.
Same code with release 1.1.1 works as expected I've tested it with uWSGI-2.0.14 and gunicorn-19.7.1