Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Inaccurate translation of file sizes from bytes to megabytes #19

Open
Loert2 opened this issue Jun 25, 2021 · 1 comment
Open

Inaccurate translation of file sizes from bytes to megabytes #19

Loert2 opened this issue Jun 25, 2021 · 1 comment

Comments

@Loert2
Copy link

Loert2 commented Jun 25, 2021

Description

Steps:

  1. Specify the file size 10 MB;
  2. Download a file with the size of 10480000 bytes from the site;
  3. Try to upload a document.

Actual result: Returns an error when the file size is exceeded. The size specified in filepos--file-info-sub is 10.5 MB.

Expected result: Skips the file. Outputs 9.99 or 10 megabytes.

Possible solution for today: maxFileSize equal '10485760'. But this does not fix the file size message.

Library version: "filepond-pluginfile-validatesize": "^2.2.4"

@peanutcolada
Copy link

peanutcolada commented Sep 13, 2022

Is this because the file size is calculated as 1KB = 1,000 bytes and not 1024?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants