Simple file content validation #12

Merged
niat8586 merged 6 commits from simple-client-validation into develop 2025-02-04 11:32:33 +01:00
Owner

Added a simple file content validation to what files can be uploaded.
This should at least help users select the correct file type.

There is no server side validation and that is something we actually will need to implement
at some point.

Added a simple file content validation to what files can be uploaded. This should at least help users select the correct file type. There is no server side validation and that is something we actually will need to implement at some point.
niat8586 added 1 commit 2025-02-04 09:51:56 +01:00
Added a simple file content validation to what files can be uploaded.
This should at least help users select the correct file type.

There is no server side validation and that is something we actually will need to implement
at some point.
niat8586 added 1 commit 2025-02-04 10:06:18 +01:00
Instead of enforcing we are "warning" that the outcome for the selected file may not work as expected
niat8586 added 1 commit 2025-02-04 10:07:23 +01:00
niat8586 added 1 commit 2025-02-04 10:26:01 +01:00
ansv7779 approved these changes 2025-02-04 10:39:25 +01:00
ansv7779 left a comment
Owner

A fine enough solution that should catch some user errors.

alert is not the best UX and showing some warning text under is maybe better, especially since there could be valid files with other extensions. Less intrusive/annoying for the user.

The accept attribute can maybe be better served as audio/*, video/* with the validation logic having the more strict interpretation. Removes some duplication as well.

A fine enough solution that should catch some user errors. `alert` is not the best UX and showing some warning text under is maybe better, especially since there could be valid files with other extensions. Less intrusive/annoying for the user. The `accept` attribute can maybe be better served as `audio/*, video/*` with the validation logic having the more strict interpretation. Removes some duplication as well.
niat8586 changed title from Simple file content validation to WIP: Simple file content validation 2025-02-04 11:06:38 +01:00
Author
Owner

Will make changes to check that the mime type is audio or video instead

Will make changes to check that the mime type is audio or video instead
niat8586 added 1 commit 2025-02-04 11:13:59 +01:00
It now only accepts audio/* and video/* mime types.
niat8586 added 1 commit 2025-02-04 11:31:29 +01:00
Changed the alert text a bit to make it more clear that they need to select an
audio or video file to upload.
niat8586 changed title from WIP: Simple file content validation to Simple file content validation 2025-02-04 11:32:24 +01:00
niat8586 merged commit f6de1c74cb into develop 2025-02-04 11:32:33 +01:00
niat8586 deleted branch simple-client-validation 2025-02-04 11:32:33 +01:00
Sign in to join this conversation.
No Reviewers
No Label
No Milestone
No project
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: DMC/seshat#12
No description provided.