Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: rework file validation error types #4203

Merged
merged 1 commit into from
Aug 20, 2024

Conversation

craigzour
Copy link
Contributor

Summary | Résumé

Related to https://gcdigital.slack.com/archives/C05G766KW49/p1724164024537339?thread_ts=1724163474.356029&cid=C05G766KW49

  • Reworked file validation error types to be able to know whether the given file extension or the one that results from the detected MIME type is invalid

Copy link
Contributor

@bryan-robitaille bryan-robitaille left a comment

Choose a reason for hiding this comment

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

Nice! LGTM 👍

INVALID_EXTENSION,
INVALID_MIME_TYPE,
}
export type FileValidationResult =
Copy link
Contributor Author

@craigzour craigzour Aug 20, 2024

Choose a reason for hiding this comment

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

This is my trying to emulate Swift Associated Values Enum feature which is perfect in those situations :)

@craigzour craigzour enabled auto-merge (squash) August 20, 2024 17:39
Copy link
Contributor

@craigzour craigzour merged commit 6849198 into develop Aug 20, 2024
13 checks passed
@craigzour craigzour deleted the refactor/file-validation-error-types branch August 20, 2024 17:42
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