-
Notifications
You must be signed in to change notification settings - Fork 5
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
Feature/check svg file type #2078
Conversation
9c2496b
to
8e65199
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@szabozoltan69 Look good.
I noticed the validation using file_field
in validated_data. It is much easier to have a function validate_<file_field>
instead, as it will handles both create and update, and we don't have to check if the field is provided by the client for different API methods.
8e65199
to
b445069
Compare
@thenav56 I implemented the suggested changes. Really nicer this way! :-) |
(Also tested it locally.) |
Validating file uploads.
Also fixes #2077 (which issue was a blocker of proper testing).