Is there a way to get the magic bytes during a file upload in LiveView to check the file MIME type?

I am trying to add a MIME type validation to the upload using LiveView,
but ideally I don’t want to wait for the whole file to upload and then do it.

Is there a way to get only the magic bytes of the file to run the validation early on?