Angular js ng-file-upload无法在ipad上运行

时间:2016-07-01 13:37:35

标签: angularjs angularjs-directive mean meanjs

我正在使用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>

1 个答案:

答案 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>