fix: inputs limit to their respective file formats

This commit is contained in:
Chris Holland 2024-10-22 15:26:46 -07:00
parent 19cc3ea0d7
commit b678ac86e8
No known key found for this signature in database
GPG key ID: 68B0A864B1B0A0D2
9 changed files with 55 additions and 6 deletions

View file

@ -12,6 +12,9 @@ import {
} from 'lucide-react'
import UserAvatar from '@components/Objects/UserAvatar'
import { updateUserAvatar } from '@services/users/users'
import { constructAcceptValue } from '@/lib/constants';
const SUPPORTED_FILES = constructAcceptValue(['image'])
function UserEditGeneral() {
const session = useLHSession() as any;
@ -165,6 +168,7 @@ function UserEditGeneral() {
<input
type="file"
id="fileInput"
accept={SUPPORTED_FILES}
style={{ display: 'none' }}
onChange={handleFileChange}
/>