(4/5/6/7/8)图像的html文件输入在某些移动设备上似乎不起作用

(4/5/6/7/8)图像的html文件输入在某些移动设备上似乎不起作用,html,css,angular,sass,Html,Css,Angular,Sass,我正在使用angular做一个聊天平台,我的部分代码涉及使用文件输入捕获图像。我已经在我的p30安卓手机上测试过了,它可以正常工作——图中显示的是聊天平台上的成功 然而,在iphone或google pixel等设备上,用户可以使用摄像头功能浏览文件或拍摄,但图像不会显示在聊天平台上。我试着研究并找到了这些文章,不幸的是,我仍然找不到这些图片没有出现的原因 链接: 我的文件输入代码: fileInput.components.html <label for="fileInputPho

我正在使用angular做一个聊天平台,我的部分代码涉及使用文件输入捕获图像。我已经在我的p30安卓手机上测试过了,它可以正常工作——图中显示的是聊天平台上的成功

然而,在iphone或google pixel等设备上,用户可以使用摄像头功能浏览文件或拍摄,但图像不会显示在聊天平台上。我试着研究并找到了这些文章,不幸的是,我仍然找不到这些图片没有出现的原因

链接:

我的文件输入代码:

fileInput.components.html

  <label for="fileInputPhoto">
    <i class="chatbox-camera-btn fa fa-camera" aria-hidden="true"></i>
  </label>
  <input
    #fileInputPhoto
    capture
    id="fileInputPhoto"
    type="file"
    (change)="onSelectFile($event)"
    accept="image/*"
  />

  <!-- File attachment -->
  <label for="fileInput">
    <i class="chatbox-file-btn fa fa-paperclip" aria-hidden="true"></i>
  </label>
  <input
    #fileInput
    id="fileInput"
    type="file"
    (change)="onSelectFile($event)"
    accept="image/*, video/*, audio/*, text/plain, .pdf, .docx, .doc, .xls, .xlsx"
  />
感谢你的启迪

this.cs.createChatImage(this.chatId, event.path[0].files[0])
   .subscribe(() => {
      this.scrollToLatest();
      this.fileInput.nativeElement.value = '';
     this.fileInputPhoto.nativeElement.value = '';
});