primeng icon indicating copy to clipboard operation
primeng copied to clipboard

FileUploadComponent : maxFileSize appears to be calculated in as decimal vs binary

Open TheTiGuR opened this issue 3 months ago • 0 comments

Describe the bug

Minor issue, but confusing when setting the maxFileSize attribute to "30_000_000" for 30MB, we get an error with a 30MB file that says that the max upload size is 28.839MB. Looking into it, this is the binary notation of 30_000_000 instead of the maybe more commonly expected decimal. This should be noted on the docs to prevent confusion.

Environment

n/a

Reproducer

No response

Angular version

17

PrimeNG version

17

Build / Runtime

Angular CLI App

Language

TypeScript

Node version (for AoT issues node --version)

20

Browser(s)

No response

Steps to reproduce the behavior

No response

Expected behavior

30_000_000 should be less ambiguous as to what most(?) users would normally see on their computers as to the size of a file.

TheTiGuR avatar Nov 05 '24 14:11 TheTiGuR