api/private: Add endpoint to get download links of uploaded tarballs
Add a new private Web API endpoint to get a list of URLs for downloading the tarballs uploaded with a deposit. In development or docker mode, the tarballs are stored in the local filesystem and served by django. In production mode, the tarballs are stored in an azure blob storage and temporary download links with a shared access signature are generated when requesting the endpoint. It enables to move costly operations related to downloading and processing tarballs in celery workers instead of letting the deposit server performing those tasks. Related to #4657 and #4658.
Showing
- swh/deposit/api/private/deposit_upload_urls.py 59 additions, 0 deletionsswh/deposit/api/private/deposit_upload_urls.py
- swh/deposit/api/private/urls.py 10 additions, 1 deletionswh/deposit/api/private/urls.py
- swh/deposit/config.py 2 additions, 1 deletionswh/deposit/config.py
- swh/deposit/settings/common.py 3 additions, 1 deletionswh/deposit/settings/common.py
- swh/deposit/settings/production.py 3 additions, 1 deletionswh/deposit/settings/production.py
- swh/deposit/tests/api/test_deposit_private_upload_urls.py 190 additions, 0 deletionsswh/deposit/tests/api/test_deposit_private_upload_urls.py
- swh/deposit/urls.py 14 additions, 1 deletionswh/deposit/urls.py
Loading
Please register or sign in to comment