Failed to set the 'value' property on 'HTMLInputElement'
I was getting this error, and just got it resolved. At least for me it was because on my input I had a 'value' in the input field set to this.state.image like this:
<label htmlFor='image'>
Image
<input
type='file'
id='file'
name="file"
placeholder="Upload an Image"
required
value={this.state.image}
onChange={this.uploadFile}
/>
</label>
After I removed the line of value={this.state.image}
it started working.
Hope this helps.
In case you could not get access to @wolghoundjesse stackblitz, you have to remove the [(ngModel)]="examen_bestand"
from the input
and get the file name from the fileChanged($event)
in the TS:
fileChanged(file){
this.examen_bestand = file.target.files[0].name;
...
}
https://github.com/angular/angular/issues/6074#issuecomment-347187761
Remove ngModel. Here is a stackblitz you likely don't need at this point. :)