Just to add, if you're using something like Supabase Storage, it might be worth setting limits server-side and I would imagine that anything not allowed would return an error via the API response (you'd need to check that). You could use this to populate an error message to display to the user client-side as opposed to taking care of validation yourself. Otherwise, you'd need to work out a complicated regex for all the types, check for that, etc., which would be a bit of work. Having the server handle that would be simpler and you just communicate on screen what file types are allowed. If the user ignores/doesn't see it, it'll fail and an error displayed informing them.