ugent-library/deliver

Create "download all" button

mietcls opened this issue · 1 comments

Story

Create "download all" button with expected file size.
This is useful for

  • scan-atelier, as sometimes they have 30+ files to download
  • everyone, when deliveries get big

Expected look

Scherm­afbeelding 2023-06-23 om 13 35 17

https://biblio-backend-ugent-prototype-git-feature-3a9547-ugent-library.vercel.app/deliver/spaces/folders/098R4IUHWAFRS9820904.html

Implementation suggestion

Inside the right table column header:

<th class="table-col-sm-fixed table-col-sm-fixed-right text-end align-middle">
    <div class="c-button-group">
        <button class="btn btn-primary">
            <i class="if if-download"></I>
            <span class="btn-text">Download all files</span>
            <small class="btn-text">&mdash; 3MB</small>
        </button>
    </div>
</th>

Expected behaviour

Open to discuss, could be a ZIP

Possible solution: use "compression 0" when sending zip, to make it more streamable.

Possible problems:

  • timeouts at different levels (traefik, browser)
  • we cannot set a Content-Length in the response, so the browser will not show a download progress counter, as it does not known the full length of it.
  • (D)DOS attacks that take advantage of public server load (protect with csrf?)

Notes:

  • Put approximate sum of all file sizes, so the user knows how big the zip file may be. Where to put this?