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

"File too big" validation UploaderImageDimensionsValidator doesn't work #12651

Open
langelone opened this issue Mar 27, 2024 · 0 comments
Open

Comments

@langelone
Copy link

Describe the bug

When I upload an image with larger dimensions than max_image_height_or_width validation UploaderImageDimensionsValidator doesn't work. Then when I try to update the ContentBlock with/without changes I get ActiveRecord::RecordInvalid (Validation failed: Images container is not valid).

To Reproduce

  1. Go to Admin -> Settings -> Homepage -> Edit Hero Image.
  2. Choose a bigger image than 8000 (actually limit now) and save (dimensions validation doesn't work).
  3. Edit again Hero Image and save (with/without changes).
  4. Get ActiveRecord::RecordInvalid (Validation failed: Images container is invalid).

Expected behavior

I expect the validator UploaderImageDimensionsValidator, despite the file not being persisted yet, to create a tmp file to get metadata from MiniMagick to check the dimensions.

Screenshots

Screenshot 2024-03-27 at 16 42 43

Stacktrace

No response

Extra data

  • Device: Mac mini
  • Device OS: macOS 14.3.1
  • Browser: Safari/Chrome
  • Decidim Version: 0.26.9
  • Decidim installation:

Additional context

No response

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

1 participant