Angular2 Reactive forms - Set default value for form input field (input type=file)?
angular
Solution
Error says that it is not possible to set input programmatically for `type='file'`.
Only empty string is possible.
Many posts say that this is a security issue to change the input value for `file` type.
jQuery, Select Input FILE and also set it to another INPUT
Problem
i have to set default image path into formbuilder but given exception. i have also try with empty string and null. ``` buildForm() { this.userForm = this.formBuilder.group({ location_id: this.formBuilder.control(null), image: this.formBuilder.control('assets/images-demo/avatars/user.png'), }); } ``` ERROR DOMException: Failed to set the 'value' property on 'HTMLInputElement': This input element accepts a filename, which may only be programmatically set to the empty string.