bradleyg / django-s3direct

Directly upload files to S3 compatible services with Django.
MIT License
661 stars 234 forks source link

Multipart-upload using EvaporateJS #114

Closed jeffbr13 closed 7 years ago

jeffbr13 commented 7 years ago

Fixes #105.

This is a large change that I've put together to support S3 multipart file upload so that we can upload objects (mostly videos) larger than the 5GB POST limit.

This isn't a breaking change, but the internals have been heavily stripped, a second endpoint has been added, and NPM is required to bundle the required JS libraries for packaging. This also means that the project isn't usable until the bundle is built.

It may be better to simply add the JS bundle to source control but the final file is ~6kloc, swamping the rest of the source. However this would allow installation via Pip's --editable/-e mode from GitHub.

Pre-release wheel

A pre-release wheel for testing is available from here:

pip install 'https://github.com/boilerroomtv/django-s3direct/releases/download/v0.4.10%2Bmultipart-upload.1/django_s3direct-0.4.10.multipart.1-py3-none-any.whl'

Building the JavaScript bundle:

npm build
jeffbr13 commented 7 years ago

Pre-release wheels updated:

https://github.com/boilerroomtv/django-s3direct/releases/tag/v0.4.11.multipart_upload.3

bradleyg commented 7 years ago

This is great, thanks so much! As it's a big change I will need some time to review, but bear with me.

jeffbr13 commented 7 years ago

Excellent! It could really do with at least a second set of eyes and neatening up. We're using it on our production site's admin already, so any changes I've been making are mostly ironing out kinks at this point.

Since it's such a breaking change, I've incremented the major version number in the last commit, so users can pin to <1.0 to avoid any breaking changes if this gets merged. We're using releases to directly install wheels until then:

https://github.com/boilerroomtv/django-s3direct/releases

bradleyg commented 7 years ago

Thanks!