Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Batch Download #69

Open
sabjorn opened this issue Jan 7, 2021 · 4 comments
Open

Batch Download #69

sabjorn opened this issue Jan 7, 2021 · 4 comments

Comments

@sabjorn
Copy link
Owner

sabjorn commented Jan 7, 2021

The current state allows users to download a .txt file which provides cURL commands to download their purchases.

However, it is possible to download the files via JS and server them after they have downloaded.

This would be a far easier and user friendly experience.

@sabjorn sabjorn self-assigned this Jan 7, 2021
@sabjorn sabjorn removed their assignment Jan 7, 2021
@sabjorn
Copy link
Owner Author

sabjorn commented Feb 12, 2021

looks like client-zip might be the solution: https://stackoverflow.com/questions/8608724/how-to-zip-files-using-javascript

@sabjorn
Copy link
Owner Author

sabjorn commented Jun 12, 2021

this solution should work BUT it will require a backend service (similar to waveform_backend) because of the CORS policy. Basically, the urls come from thet4.bcbits.com domain.

This shouldn't be too difficult to build. Likely, each URL should be sent off in sequence, and then the file response returned to the frontend where it will get packaged into the zip.

alternatively it may be possible to just have all the URLs downloaded in the backend but it is unclear if the final zip download can be initiated from the backed. If they have to be passed to the frontend, doing them in a giant batch will likely result in too much memory usage.

sequential will be slower for sure. but the added benefit is the ability to update a progress bar on the frontpage to inform the user that the download is working.

@sabjorn
Copy link
Owner Author

sabjorn commented Jun 12, 2021

@sabjorn
Copy link
Owner Author

sabjorn commented Mar 7, 2022

it may be best to have the download action happen on the download link page automatically. As downloads become available on the page (they happen in a sequence over time) the action could add it to a backend download queue.
This would also allow for a downloading icon/progress bar for each track as they download. Then finally a zip download with everything becomes available

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant