angular-rest-upload
angular-rest-upload copied to clipboard
ERROR DOMException: Failed to set the 'value' property on 'HTMLInputElement'
Just a note: Usually the value of <input type="file">
is read-only (in it's View representation). You may need to set the option emitModelToViewChange: false
when calling setValue()
to avoid the SecurityError: "The operation is insecure." (Firefox) or ERROR DOMException: Failed to set the 'value' property on 'HTMLInputElement' (Chrome, Safari):
this.form.get('<name>').setValue(file, {emitModelToViewChange: true});
I'm curious though why the DOM error is not triggered in your example.