showing results for - "angular material upload file"
Enes
17 Nov 2018
1<mat-form-field class="columns">
2    <mat-label *ngIf="selectedFiles; else newFile">{{selectedFiles.item(0).name}}</mat-label>
3    <ng-template #newFile>
4        <mat-label>Choose file</mat-label>
5    </ng-template>
6    <input matInput disabled>
7    <button mat-icon-button matSuffix (click)="fileInput.click()">
8        <mat-icon>attach_file</mat-icon>
9    </button>
10    <input hidden (change)="selectFile($event)" #fileInput type="file" id="file">
11</mat-form-field>
12
13
14::::::::: AND TS ::::::
15selectFile(event) {
16    this.selectedFiles = event.target.files;
17}
18
Alienor
28 Jan 2019
1
2<div class="card" >
3  <div class="card-header">
4    File Upload
5  </div>
6  <div class="card-body">
7    <mat-form-field>
8  <div>
9    <mat-toolbar>
10      <!-- Display files names -->
11      <input matInput [(ngModel)]="fileAttr" readonly name="name" />
12
13      <!-- Browse Button -->
14      <button mat-flat-button color="primary">
15        Browse File
16      </button>
17    </mat-toolbar>
18
19    <!-- Fetch selected filed on change -->
20    <input type="file" #fileInput id="uploadFile" (change)="uploadFileEvt($event)" name="uploadFile" multiple="multiple"
21      accept="image/*" />
22  </div>
23</mat-form-field>
24  </div>
25
26  <div class="card-footer">
27    <div><img src="{{dataimage}}" width="300px"></div>
28  </div>
29</div>
30
queries leading to this page
input file upload html angular materialmaterial angular file uploaderangular material file upload previewfile upload in angular material 8angular material uploadangular material preview upload filefile upload with angular materialangular material fie uploadangular material file upload buttonimage upload in angular materialangular material file upload angular 8material form with upload image angularangular material button file uploadmat file upload in angularangular material input file uploadangular mat file uploadangular mat file upload buttonangular material upload imangular material file upload exampleangular matrial file uploadmaterial angular file uploadangular mat file uploaderimage upload in angular 8 materialmaterial angular upload fileangular material file uploadupload file in angular materialmat upload filefile upload in angular materialfile upload material design angularangular material design upload filemultiple file upload angular materialangular material upload imageinput file upload angular materialangular material upload file inputangular material file upload form exampleupload and save file with material angular in localangular material upload file componentangular material file upload componentupload file material angularimage upload using angular materialmat file upload angular materialinput file upload form angular material examplefile upload angular material inputmat file upload angular materialangular material fileupload exampleangular material 8 upload imagefile upload with preview angular materialfile upload in material ui angularfile upload material angualrangular file upload materialhow to upload file in angular materialfile upload angular materialangular material document uploadmat angular to upload fileangular material file uploader angular file upload demofield upload file material io angularangular material upload filefile upload within angular material dialoupload file angular materialangular material image upload with previewfile upload mat formfile upload using angular materialangular material file upload inputfile upload in material angularupload and save file with material angularangular material upload file reactfile upload material angularangular materials upload fileupload files angular materialangular material file upload optionsangular material image uploadangular material file upload formangular material file upload controlmat file upload angular 9image upload angular materialangular material upload file