Components: Input type="file" support

Created on 11 Dec 2019  路  5Comments  路  Source: angular/components

Bug, feature request, or proposal:

Feature Proposal

What is the expected behavior?

Instead of creating a hidden input and a button to handle file uploads it'd be great for matInput to support type="file" inside a mat-form-field. This would make error handling much smoother and more in line the UI.
<input #fileUpload matInput mat-raised-button type="file" accept="image/png, image/jpeg, image/jpg">

What is the current behavior?

ERROR Error: Input type "file" isn't supported by matInput.

P5 materiainput feature

Most helpful comment

up for material file upload

All 5 comments

This has been on our backlog for a long time (which we track in Jira), but we don't have any plans to work on it. The biggest obstacle is a lack of a Material Design spec for it.

up for material file upload

Still hardly needed!!!

This would be really great if it was available. It gets real awkward when you have such a nice form and then you gotta implement some hacky thing for the file upload that doesn't play nice with the rest of what we've built.

This has been on our backlog for a long time (which we track in Jira), but we don't have any plans to work on it. The biggest obstacle is a lack of a Material Design spec for it.

Is there anything that can be done to help push for a Material Design spec for this?

Was this page helpful?
0 / 5 - 0 ratings

Related issues

LoganDupont picture LoganDupont  路  3Comments

vitaly-t picture vitaly-t  路  3Comments

xtianus79 picture xtianus79  路  3Comments

constantinlucian picture constantinlucian  路  3Comments

michaelb-01 picture michaelb-01  路  3Comments