juliomalegria / django-chunked-upload

Upload large files to Django in multiple chunks, with the ability to resume if the upload is interrupted.
MIT No Attribution
214 stars 71 forks source link

Use whole chunk size if HTTP_CONTENT_RANGE is not provided #10

Closed SpaceK33z closed 9 years ago

SpaceK33z commented 9 years ago

Jquery File Upload does not send the HTTP_CONTENT_RANGE header if the file is smaller then the given chunk size. This packages fails when not providing this header, so I've fixed this.

I can understand if you don't want to merge this (as this also could be fixed in JFU), but given that this package is intended to work with JFU I think this should be fixed here.

juliomalegria commented 9 years ago

Thanks @SpaceK33z for collaborating. This is super handy! I'll merge it right away.

juliomalegria commented 9 years ago

By the way, I added a fail_if_no_header option (86e2c07) that raises an exception if the header is not found (by default is set to False). I can see some people wanting a more strict structure.

SpaceK33z commented 9 years ago

Okay, nice! Thank you for doing this so quickly :).