Adds a download_service app, designed to provide simpler downloads to users.
GET /download/dds-projects/<project-id>.zip will respond with a streamed zip file download of every file in a Duke DS project, provided the user is authenticated and has download access to the project.
Core functionality is in the DDSZipBuilder class. It uses the zipstream-new package to provide a streaming zip file with minimal CPU/memory/disk usage by the server. It is generator-driven, so that data is only fetched as needed. Unique requirements are documented in comments and in tests_zipbuilder.py (e.g. file paths and sizes are determined early, but signed content URLs with an expiration date not requested until they are needed)
Since the size of the streaming zip file is not known ahead of time, the HTTP response does not include a content length. When we implement links to this endpoint, we should provide an estimated file size.
download_service
app, designed to provide simpler downloads to users./download/dds-projects/<project-id>.zip
will respond with a streamed zip file download of every file in a Duke DS project, provided the user is authenticated and has download access to the project.zipstream-new
package to provide a streaming zip file with minimal CPU/memory/disk usage by the server. It is generator-driven, so that data is only fetched as needed. Unique requirements are documented in comments and in tests_zipbuilder.py (e.g. file paths and sizes are determined early, but signed content URLs with an expiration date not requested until they are needed)Fixes #203