nishantmc / angular-material-fileupload

A fileupload component based on angular-material design
MIT License
98 stars 77 forks source link

Upload not working in IE 11 error: Object doesn't support property or method 'set' #32

Closed Ruchi-Sinha closed 5 years ago

Ruchi-Sinha commented 5 years ago

HTML: <input id="singleFile" type="file" [fileUploadInputFor]= "fileUploadQueue"/> <mat-file-upload-queue #fileUploadQueue [fileAlias]="'file'" [httpUrl]="'http://localhost:8080/api'">--> <mat-file-upload [file]="file" [id]="i" *ngFor="let file of fileUploadQueue.files; let i = index">

This is working fine in Chrome but when I try this in IE 11 the upload icon and Upload All button both throw error:

ERROR TypeError: Object doesn't support property or method 'set' ERROR CONTEXT [object Object]

Ruchi-Sinha commented 5 years ago

Figured this one out. Error: Object doesn't support property or method 'set' is coming because IE 11 doesnot support formData.set() so changed it to formData.append() in all the files of angular-material-fileupload and it started working.

script-newbie commented 5 years ago

bro @Ruchi-Sinha thanks for this you saved me a lot of time with this one.

co0kie commented 5 years ago

bro @Ruchi-Sinha thanks for this you saved me a lot of time with this one.

hoi