primefaces / primefaces/primereact

FileUpload: Uploaded file name is not trimmed when files with larger filenames are uploaded.

Open
#7,935 1 comment 0 reactions 1 assignee View on GitHub

@akshayaqburst is already working on this.

Since Apr 24, 2025.

Type: Enhancement
Dominant language
CSS
Stars
8.3k
Forks
1.2k
PR merge metrics
No merged PRs in 30d

Description

Describe the bug

FileUpload: Uploaded file name is not trimmed when files with larger filenames are uploaded.

Reproducer

https://primereact.org/fileupload/#advanced

System Information
System:
OS: Linux 5.15 Ubuntu 20.04.6 LTS (Focal Fossa)
CPU: (8) x64 11th Gen Intel(R) Core(TM) i7-1165G7 @ 2.80GHz
Memory: 1.43 GB / 7.47 GB
Container: Yes
Shell: 5.0.17 - /bin/bash
Binaries:
Node: 22.14.0 - ~/.nvm/versions/node/v22.14.0/bin/node
npm: 10.9.2 - ~/.nvm/versions/node/v22.14.0/bin/npm
pnpm: 10.4.1 - ~/.nvm/versions/node/v22.14.0/bin/pnpm
npmPackages:
react: 18.3.1 => 18.3.1
Steps to reproduce the behavior
  1. https://primereact.org/fileupload/#advanced
  2. Upload a file with a larger name.
  3. The file name displayed is not trimmed and display takes a bigger area.
Image
Expected behavior

The file name should be trimmed as per the prop passed or a default file name length.
Expected screenshot attached -

Image

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.