Altinn / Altinn/altinn-studio

Should the FileUpload have `required` and `readOnly`?

Open
#16,618 2 comments 0 reactions 1 assignee View on GitHub

@olemartinorg is already working on this.

Since Aug 27, 2026.

breaking-change kind/analysis squad/utforming
Dominant language
C#
Stars
169
Forks
101
Avg merge
1d 5h
Merged PRs (30d)
272

Description

Description

The FileUpload and FileUploadWithTag components both have required and readOnly properties from the default FormComponentProps. For these components required does not really make sense, and is not used for anything other than incidentally setting a required * marker next to the title. It should rather behave more similar to RepeatingGroup which get it set based on if minCount > 0. We should remove the required property since it has no real effect.

As for readOnly, there is no visual indication that the component is read only. It only blocks the user from uploading without any explanation. I am not sure what the purpose of a readOnly file upload could possibly be, but if we need to keep it, it should be indicated better, and probably not show a "file drop zone" at all.

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.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.