Skip to content

Commit

Permalink
Update document_views.py
Browse files Browse the repository at this point in the history
  • Loading branch information
gecBurton authored Sep 12, 2024
1 parent edcc829 commit 51b5832
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions django_app/redbox_app/redbox_core/views/document_views.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
".bmp",
".jpeg",
".png",
".jpeg",
".jpg",
]
MAX_FILE_SIZE = 209715200 # 200 MB or 200 * 1024 * 1024

Expand Down Expand Up @@ -123,7 +123,7 @@ def validate_uploaded_file(uploaded_file: UploadedFile) -> Sequence[str]:
errors.append("File has no name")
else:
file_extension = Path(uploaded_file.name).suffix
if file_extension not in APPROVED_FILE_EXTENSIONS:
if file_extension.lower() not in APPROVED_FILE_EXTENSIONS:
errors.append(f"Error with {uploaded_file.name}: File type {file_extension} not supported")

if not uploaded_file.content_type:
Expand Down

0 comments on commit 51b5832

Please sign in to comment.