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

Set constraints for images in uploader #1513

Merged
merged 6 commits into from
Dec 17, 2023
Merged

Conversation

raccube
Copy link
Contributor

@raccube raccube commented Dec 11, 2023

Closes #1510
Closes #1511

Copy link

codecov bot commented Dec 11, 2023

Codecov Report

Attention: 2 lines in your changes are missing coverage. Please review.

Comparison is base (acf9595) 95.70% compared to head (401498e) 95.71%.

Files Patch % Lines
...controllers/settings/profile_picture_controller.rb 50.00% 1 Missing ⚠️
app/uploaders/base_uploader.rb 85.71% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1513   +/-   ##
=======================================
  Coverage   95.70%   95.71%           
=======================================
  Files         174      174           
  Lines        2699     2704    +5     
=======================================
+ Hits         2583     2588    +5     
  Misses        116      116           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member

@pixeldesu pixeldesu left a comment

Choose a reason for hiding this comment

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

Works fine, but it'd be interesting to see if we could show proper validation errors for the improper files instead of just saying "Unable to update profile".

That might lead people to retry over and over, even though the file is just invalid.

@raccube raccube merged commit ca2088b into main Dec 17, 2023
11 of 13 checks passed
@raccube raccube deleted the fix/image-upload-constraints branch December 17, 2023 22:13
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

Successfully merging this pull request may close these issues.

Strip animation from gif uploads Add validation to file uploads
2 participants