question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Enhance FileInput to recognize user operating system for maxSize calculation

See original GitHub issue

Expected Behavior

FileInput should recognize what operating system a user is on when determining if 1024 (binary) or 1000 (decimal) should be used as the conversion factor between bytes, KB, etc.

Right now, FileInput uses binary value (1024) of bytes as a conversion factor to determine if a file has exceeded the max size or not. This seems to be the better option (vs decimal conversion factor of 1000) because it ensures that all windows users will experience and accurate comparison between their file browser and Grommet’s FileInput. Previously, window’s users were being flagged by Grommet’s FileInput that their file was too large even though their file browser said it was less than the max size (their file browser used 1024, while grommet used 1000).

While our current solution provides users (regardless of their operating system) with a reasonable experience, it may be nice to enhance FileInput in the future to be slightly more intelligent.

Actual Behavior

URL, screen shot, or Codepen exhibiting the issue

Steps to Reproduce

Your Environment

  • Grommet version:
  • Browser Name and version:
  • Operating System and version (desktop or mobile):

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

github_iconTop Results From Across the Web

grommet - NPM Package Versions - Socket - Socket.dev
Enhanced FileInput to recognize user operating system for maxSize calculation. (#6427); Changed DataChart to better align legend style with chart style. (#6411) ...
Read more >
DYNCALCCACHEMAXSIZE - Oracle Help Center
Specifies the maximum amount of memory allocated for the dynamic calculator cache for each database. The specified value takes effect for all databases...
Read more >
Validation of file size while uploading using JavaScript / jQuery
In this article, we will learn how to implement file size validation by checking file size before uploading using Javascript and jQuery.
Read more >
Nastran Dmap Error Message List - Siemens PLM
NX Nastran displays User Information, Warning, and Error messages in the printed ... Operating system specific messages can appear in the NX Nastran...
Read more >
Version 5.0 User Guide
Referencing Columns and Memory Registers in a Formula . ... Note: If you have files that were created in the Mac version prior...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found