Skip to content

Commit

Permalink
Validate file extension with lower case
Browse files Browse the repository at this point in the history
  • Loading branch information
bruecksen committed Nov 14, 2024
1 parent cc524ab commit f8026cf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion bakeup/workshop/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ def get_product_count(self):
def validate_video_file(value):
# Check that the uploaded file is a video file
valid_extensions = [".mp4", ".mov", ".avi", ".mkv"]
if not any(value.name.endswith(ext) for ext in valid_extensions):
if not any(value.name.lower().endswith(ext) for ext in valid_extensions):
raise ValidationError(
"Unsupported file extension. Allowed extensions are: .mp4, .mov, .avi, .mkv"
)
Expand Down

0 comments on commit f8026cf

Please sign in to comment.