Skip to content

[11.x] Improve File validation structure and clarify File::image() usage #10142

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

Merged
merged 9 commits into from
Jan 27, 2025

Conversation

SanderMuller
Copy link
Contributor

Split from #10136

This PR enhances the validation documentation with the following updates:

  1. Improved Structure:

    • Adds consistent headings for file validation rules like file sizes and image dimensions.
    • Separates the explanation of dimensions from File::image() for better focus.
  2. Expanded File::image() Details:

    • Clearly lists supported file types (jpg, jpeg, png, bmp, gif, svg, webp).
    • Adds a warning about potential XSS risks with SVG files and how to handle them safely.
  3. Streamlined Examples:

    • Moves method chaining examples (e.g., dimensions) to dedicated sections for clarity.
    • Includes a concise example for file size validation.

@taylorotwell taylorotwell merged commit dbb8b04 into laravel:11.x Jan 27, 2025
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.

2 participants