How to use input type="file"?

I’m trying to use an input with type="file" in the UI, but I’m getting this error:

Input type “file” isn’t supported by matInput.

What is the correct way to implement a file upload input in this case? Is there a recommended alternative approach?

3 Likes

Use HTML input element.

4 Likes

Can you clarify this? I don’t see any other input element available except the one from “Form controls”.

3 Likes

You can take this HTML5 element , and inside the HTML editor you can provide the input for file upload like below
image

7 Likes

Thanks for the suggestion!

3 Likes