Issue
How to use input type file in angular material
Hi, I am using angular material for designing. when i go on angular material site there no input type file element. anyone know about this.
Solution
Angular Material does not support yet a workaround for file upload. There are alternative to archieve this. e.g using external libraries.
angular-material-fileupload: link to npm package
Supported features:
- Drag and drop
- common uploads
- progress bar
- file size and more...
ngx-material-file-input: Link to repository
Supported features:
ngx-mat-file-input
component, to use inside Angular Materialmat-form-field
- a
FileValidator
withmaxContentSize
, to limit the file size - a
ByteFormatPipe
to format the file size in a human-readable format - and more small minor features...
Update
See the answer here if you just need a workaround without external library https://stackoverflow.com/a/53546417/6432698
Answered By - billyjov
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.