diff --git a/projects/ucap-webmessenger-ui-message/src/lib/components/write.component.ts b/projects/ucap-webmessenger-ui-message/src/lib/components/write.component.ts index 323cafd9..1e0f69eb 100644 --- a/projects/ucap-webmessenger-ui-message/src/lib/components/write.component.ts +++ b/projects/ucap-webmessenger-ui-message/src/lib/components/write.component.ts @@ -151,6 +151,7 @@ export class WriteComponent implements OnInit, OnDestroy, AfterViewInit { } onClickImage() { + this.fileInput.nativeElement.setAttribute('accept', 'image/*'); this.fileInput.nativeElement.click(); const self = this; this.fileInput.nativeElement.onchange = async () => { @@ -172,6 +173,7 @@ export class WriteComponent implements OnInit, OnDestroy, AfterViewInit { } onClickAttachment() { + this.fileInput.nativeElement.removeAttribute('accept'); this.fileInput.nativeElement.click(); const self = this; this.fileInput.nativeElement.onchange = () => { @@ -519,7 +521,7 @@ export class WriteComponent implements OnInit, OnDestroy, AfterViewInit { employeeType: EmployeeType.Regular, nickName: '', - order:'' + order: '' }; } }