我正在使用ionic来构建一个包含文件上传功能的移动应用。
版本
支持的文件是
我正在尝试使用属性为type =“ file”的HTML输入标签
<input style="display:none;" type="file" accept="image/*, .pdf, .doc, .docx" (change)="fileSelected($event)" #chosenFile />
<button class="btnAttach" (click)="chosenFile.click()"><ion-icon class="attach" name="attach"></ion-icon></button>
这对于android和ios上的图像效果很好,但是它不允许我选择pdf或word文档。我可以看到它们,但它们显示为灰色。
这里的任何帮助将不胜感激。