Skip to content

Commit 859db85

Browse files
committed
Undo unwanted change
1 parent cc7023d commit 859db85

File tree

1 file changed

+0
-13
lines changed

1 file changed

+0
-13
lines changed

filer/validation.py

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -91,19 +91,6 @@ def sanitize_svg(file_name: str, file: typing.IO, owner: User, mime_type: str) -
9191
file.write(xml) # write to binary file with utf-8 encoding
9292

9393

94-
def validate_octet(file_name: str, file: typing.IO, owner: User, mime_type: str) -> None:
95-
"""Octet streams are binary files without a specific mime type. They are run through
96-
a virus check."""
97-
try:
98-
from django_clamd.validators import validate_file_infection
99-
100-
validate_file_infection(file)
101-
except (ModuleNotFoundError, ImportError):
102-
raise FileValidationError(
103-
_('File "{file_name}": Virus check for binary/unknown file not available').format(file_name=file_name)
104-
)
105-
106-
10794
def validate_upload(file_name: str, file: typing.IO, owner: User, mime_type: str) -> None:
10895
"""Actual validation: Call all validators for the given mime type. The app config reads
10996
the validators from the settings and replaces dotted paths by callables."""

0 commit comments

Comments
 (0)