Skip to content

Commit f8026cf

Browse files
committed
Validate file extension with lower case
1 parent cc524ab commit f8026cf

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

bakeup/workshop/models.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ def get_product_count(self):
6363
def validate_video_file(value):
6464
# Check that the uploaded file is a video file
6565
valid_extensions = [".mp4", ".mov", ".avi", ".mkv"]
66-
if not any(value.name.endswith(ext) for ext in valid_extensions):
66+
if not any(value.name.lower().endswith(ext) for ext in valid_extensions):
6767
raise ValidationError(
6868
"Unsupported file extension. Allowed extensions are: .mp4, .mov, .avi, .mkv"
6969
)

0 commit comments

Comments
 (0)