Docstrings

This commit is contained in:
shamoon
2026-04-10 11:17:46 -07:00
parent f3ba77c25c
commit e197f259c7
2 changed files with 5 additions and 1 deletions

View File

@@ -256,6 +256,10 @@ class ApplicationConfigurationSerializer(serializers.ModelSerializer):
image.close()
def validate_app_logo(self, file: UploadedFile):
"""
Validates and sanitizes the uploaded app logo image. Model field already restricts to
jpg/png/gif/svg see src/paperless/models.py#L200
"""
if not file:
return file

View File

@@ -264,7 +264,7 @@ def validate_raster_image(file: UploadedFile) -> None:
"""
Validates that the uploaded file is a valid raster image (JPEG, PNG, etc.)
and does not exceed maximum pixel limits.
Raises ValidationError if the image is invalid or potentially dangerous.
Raises ValidationError if the image is invalid or exceeds the allowed size.
"""
file.seek(0)