Skip to content

[upload] Implement "compact" mode to show single progress bar instead of file list #10455

@mstahv

Description

@mstahv

Description

Vaadin Upload supports batch uploading multiple files at once. It also have a feature that it shows the files being uploaded with a row in the UI, that shows file name, its status and also a progressbar about the upload request (if active). With a large number of uploads, the amount of generated DOM becomes so huge that the browser chokes under the load.

Currently the DOM pressure causes noticeable slowness, but if #6698 will be fixed, this will become the real bottleneck.

As a related note, showing progress of individual files becomes meaningless in the UI, if there is a large number of files.

Expected outcome

Upload UI should get into a batch mode, if there is more than n amount of files being uploaded. n should be configurable (and have a good attribute name) and should default to 5. In the batch mode, there should only be a single progressbar about the process (instead of e.g. 1000 for 1000 small files like currently) and individual files should not be shown at all. The progressbar should show the progress by the bytes sent in the batch and total bytes (sum of sizes of files in the queue).

There should also be a text line showing the progress: the file that is currently being uploaded, number of files remaining to be uploaded (and total in the batch), progress in percentage and bytes (formatted into metric system) and ETA.

Minimal reproducible example

Upload in multifile setup.

Steps to reproduce

Upload a n*1000 small files.

Environment

All

Browsers

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions