-
Notifications
You must be signed in to change notification settings - Fork 285
feat: support size_limit in upload config #2301
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
Conversation
33a2a8d
to
bd258cc
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #2301 +/- ##
==========================================
+ Coverage 85.08% 85.22% +0.14%
==========================================
Files 353 353
Lines 8039 8049 +10
Branches 2120 2122 +2
==========================================
+ Hits 6840 6860 +20
+ Misses 1013 1005 -8
+ Partials 186 184 -2 ☔ View full report in Codecov by Sentry. |
Size Change: +1.59 kB (0%) Total Size: 1.82 MB
ℹ️ View Unchanged
|
return true; | ||
}; | ||
|
||
function prettifyFileSize(bytes: number) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We could reuse this function also for file size in message attachments.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
AFAIK, none of our default attachment components show file size.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh no, my mistake - we do. Will update.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done in 5aba95c
@myandrienko could you please add tests? |
Quick fix for some stuff that got broken after removing `pretty-bytes` in #2301: 1. Sizes are now 1024-based (as opposed for 1000-based) to align with backend. 2. Add support for zero-precision,
## [11.14.0](v11.13.1...v11.14.0) (2024-04-08) ### Bug Fixes * add missing PinIndicator placeholder ([#2352](#2352)) ([e059af8](e059af8)) * file size formatting ([#2357](#2357)) ([7e98a85](7e98a85)), closes [#2301](#2301) ### Features * support size_limit in upload config ([#2301](#2301)) ([a8aa524](a8aa524))
🎉 This PR is included in version 11.14.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Submit a pull request
🎯 Goal
Support the newly introduced upload size limit setting.
🎨 UI Changes
To-Do