Option to add files to UploadFileList

Open Beginner friendly
#9,703 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
68/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Quiet
Tech stack
java
Domain
frontend

Research direction

Start by locating the UploadFileList API and the UploadFile record in the modular Upload implementation. Add the requested way to supply an existing UploadFile and verify that it appears in the list, while checking the component's existing usage and tests for the expected behavior.

Written by the indexing model from the issue text.

Description

enhancement vaadin-upload workaround
Describe your motivation

I really like the new modular Upload. What I am missing, is the option to add file to the UploadFileList.
The reason for this is, we often used the Upload as a CustomField and therefor it would be nice to show already existing files in the list.

Describe the solution you'd like

Add a method to add a file to the UploadFileList.

void addFile(UploadFile file)

record UploadFile(
    int complete,
    String fileName,
    ...
)
Describe alternatives you've considered

Before we did this with below code:

upload.getElement().setAttribute("files", json);
Additional context

Vaadin: 25.2

Dominant language
Java
Stars
129
Forks
78
Avg merge
17h 42m
Merged PRs (30d)
196

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from vaadin/flow-components

All issues in vaadin/flow-components

Similar issues

More Java issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.