some users try to upload img/heic although only jpg, png or pdf are allowed. in the best case our backend should also support img/heic. However, our backend system will not support img/heic for a long time. A conversion of the file format is legally not possible, because we have to archive the file unchanged. Currently, the user receives an error message after the upload that the file format img/heic is not supported. From a user experience point of view, should it only be possible to select jpg, png or pdf? So that the user can't select img/heic in the first place?
It generally is better to help the user avoid making an error in the first place, yes. You already have listed the possible actions you could take to achieve that in order of usefulness:
- Support the file format in question
- Convert from the file format to something that's supported behind the scenes
- Prevent the user from selecting anything that's unsupported
- Allow the user to upload something unsupported and error out afterwards, requiring them to resubmit only the erroring fields in question
- worst case - allow anything, error out and have the user fill out the entire form again from the beginning
As 1 and 2 are impossible for you, 3 is the way to go.