Skip to content

fix(gallery): file size limit and user information in query#22

Draft
subinasr wants to merge 1 commit into
developfrom
fix/gallery
Draft

fix(gallery): file size limit and user information in query#22
subinasr wants to merge 1 commit into
developfrom
fix/gallery

Conversation

@subinasr

Copy link
Copy Markdown
Contributor

No description provided.

@subinasr subinasr requested a review from sudip-khanal June 26, 2026 06:07
Comment thread utils/validators.py


def validate_image_size[F: File | None](value: F) -> F:
if value and value.size and value.size > MAX_IMAGE_SIZE:

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
if value and value.size and value.size > MAX_IMAGE_SIZE:
if value is not None and value.size > MAX_IMAGE_SIZE:

Comment thread utils/validators.py


def validate_report_file_size[F: File | None](value: F) -> F:
if value and value.size and value.size > MAX_REPORT_FILE_SIZE:

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
if value and value.size and value.size > MAX_REPORT_FILE_SIZE:
if value is not None and value.size > MAX_REPORT_FILE_SIZE:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants