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

Add support for allowed file extensions #9224

Closed
wants to merge 1 commit into from

Conversation

amirhusein1996
Copy link

Add support for allowed file extensions in FileField

In the init method:

  • Added handling for 'allowed_extensions' parameter.
  • Ensured 'allowed_extensions' is either None or a valid list/tuple.
  • If 'allowed_extensions' is provided, added a FileExtensionValidator to the list of validators.

@cclauss
Copy link
Contributor

cclauss commented Jan 26, 2024

Please rebase to fix the failing pre-commit test.

@tomchristie
Copy link
Member

tomchristie commented Mar 21, 2024

Things I would want to see us encouraging...

  • We start declining functionality pull requests that have not had a prior discussion.
  • We encourage our users to advocate for behavioural changes from a documentation-first perspective.
  • Comparison with Django... if a change can be shown very simply to be non-breaking and it brings us more closely in line with a Django behavior, then it's a maybe. Otherwise we should strongly default to "no". Most proposed changes do not need to be included in core.

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.

3 participants