-
Notifications
You must be signed in to change notification settings - Fork 1
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
Assets: Global Rules/Validation + CP Default Rules #619
Comments
We've mentioned this plenty of times but I can't find an issue for it. The idea was to always be able to add validation rules to the container. |
I would go further to say that this is a medium sized issue. If you've ever tried processing a 20mb image with glide and generating reponsive sizes / fallbacks you might see a website grind to a halt for a while, and possibly crash a server / require a restart. Also, are PHP validation rules what we need here? In an ideal situation I would catch the large file size with JS validation before sending it to the server or to cloud storage. Just some thoughts. |
That's a good idea too. To stop the large file getting to the server in the first place. 👍 |
While we're on the subject, there are a couple of more validation rules that would help me avoid asset related crashes:
I've been reading other issues and requests from v2 and there are concerns about resizing originals on upload - with some stating that they think original sizes should be kept. Container validation rules should keep everyone happy, giving you the option to resize / restrict or not. I wonder though, would it be possible to always keep the original file, generate a smaller size where necessary and then use that smaller size for glide generation, i.e. the original massive file would be kept but a smaller version would be used by glide for performance. |
Recently we had a content editor accidentally upload a large .psd file directly into the CP via the Assets screen. This mean that all the individual field validation rules were ignored. This made me think of a couple of suggestions:
Very much a nice to have, obviously not a big issue.
The text was updated successfully, but these errors were encountered: