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.
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:
ngx-material-file-input: Link to repository
Supported features:
ngx-mat-file-input
component, to use inside Angular Material mat-form-field
FileValidator
with maxContentSize
, to limit the file sizeByteFormatPipe
to format the file size in a human-readable formatUpdate
See the answer here if you just need a workaround without external library https://stackoverflow.com/a/53546417/6432698