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

feat: specified minimum size for uploaded images (for pre-checks) #798

Merged

Conversation

monsieurtanuki
Copy link
Contributor

What

  • Uploaded images have a minimum accepted size. Smaller images get rejected.
  • In order to avoid this, developers can check the image size before trying to upload them.
  • This is what we do in Smoothie. With this PR we can do that from values taken from off-dart.

Impacted file

  • image_helper.dart: specified minimum size for uploaded images

Impacted file:
* `image_helper.dart`: specified minimum size for uploaded images
@codecov-commenter
Copy link

Codecov Report

Merging #798 (fe40059) into master (a26ec2a) will decrease coverage by 0.10%.
Report is 1 commits behind head on master.
The diff coverage is n/a.

@@            Coverage Diff             @@
##           master     #798      +/-   ##
==========================================
- Coverage   74.87%   74.77%   -0.10%     
==========================================
  Files         199      199              
  Lines        7319     7319              
==========================================
- Hits         5480     5473       -7     
- Misses       1839     1846       +7     
Files Changed Coverage Δ
lib/src/utils/image_helper.dart 58.82% <ø> (ø)

... and 2 files with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

Copy link
Member

@teolemon teolemon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, very nice extraction 👍
thanks @monsieurtanuki

@monsieurtanuki monsieurtanuki merged commit 3cf14f2 into openfoodfacts:master Sep 7, 2023
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

Successfully merging this pull request may close these issues.

None yet

3 participants