我正在使用ng-file-upload在我的meanjs应用程序中上传图片。 它适用于ubuntu浏览器和Mac浏览器,但是当我在ipad上测试它时它确实无法正常工作。
这个问题有解决方法吗?
<img class="img-thumbnail" ngf-src="file" ngf-resize="{width: 100, height: 100, quality: 0.9}" ngf-no-object-url="true" > <div class="btn btn-primary button" ngf-select ng-model="file" name="file" ngf-pattern="'.jpg,.jpeg,.png'" ngf-accept="'image/*'" ngf-max-size="2MB" ngf-min-height="650" ngf-min-width="900" ngf-resize="{width: 1000, height: 650}" required>Browse Image </div> <span class="info-note" >Allowed File Dimension: 1000px * 650px, Allowed File Size: 2 MB, Allowed File Type: JPG, JPEG, PNG </span> <div ngf-thumbnail="file" ngf-size="{width: 20, height: 20, quality: 0.9}" ngf-as-background="boolean"> </div>
答案 0 :(得分:1)
我刚将div更改为输入类型文件,它也适用于iPad。
<img class="img-thumbnail" ngf-src="file" ngf-resize="{width: 100, height: 100, quality: 0.9}" ngf-no-object-url="true" >
<input type="file" class="btn btn-primary button" ngf-select ng-model="file" name="file" ngf-pattern="'.jpg,.jpeg,.png'"
ngf-accept="'image/*'" ngf-max-size="2MB" ngf-min-height="650" ngf-min-width="900"
ngf-resize="{width: 1000, height: 650}" required>Browse Image
</input>
<span class="info-note" >Allowed File Dimension: 1000px * 650px, Allowed File Size: 2 MB, Allowed File Type: JPG, JPEG, PNG
</span>
<div ngf-thumbnail="file" ngf-size="{width: 20, height: 20, quality: 0.9}" ngf-as-background="boolean">
</div>