Is there anyway that i can restrict the size of the file getting uploaded?
I use,
<div>
<input id="singleFile" type="file" [fileUploadInputFor]="fileUploadQueue" />
<mat-file-upload-queue #fileUploadQueue [fileAlias]="'file'"
[httpUrl]="'http://localhost:5000/fileupload'">
<mat-file-upload [file]="file" [id]="i" *ngFor="let file of fileUploadQueue.files; let i = index">
</mat-file-upload>
</mat-file-upload-queue>
</div>
I need like, the error has to be thrown after selecting the file.
I have added a function in the component that checks the first uploaded file for its size and added also a simple expression in the template to show how to access the file size.
It obviously needs some improvement but should get your started.