ng-file-upload 如何实现多图片上传?
我的代码:
html:
<p class="row photos">
<p class="col-xs-2 pt" ng-repeat="f in detailImgs" style="font:smaller">
{{f.name}}
<img
ngf-src="f.file"
ngf-resize="{width: 40, height: 40, quality: 0.9}"
ngf-no-object-url="true or false"
>
</p>
<p class="col-xs-2 pt upload">
<i class="ion-plus-round"></i>
<p class="button" ngf-select ng-model="detailImgs" ngf-multiple="true">Select</p>
</p>
</p>
javascript:
$scope.detailImgs = [];
这样写的话,还是单图片,不能上传多张。点击上传会把之前传的那张图片去掉了。
ng-file-upload地址:https://github.com/danialfarid/ng-file-upload#usage ng-file-upload给的地址:http://jsfiddle.net/danialfarid/2vq88rfs/136/
补充我写的代码,html部分稍微改了下。关键部位没有修改。
I can follow the official instructions verbatim
http://jsfiddle.net/danialfar...
Maybe you have made other configuration errors. Do you have more detailed code?
Also
No need to add
.file
Write an example yourself:
https://github.com/hjzheng/CU...
Code:
https://github.com/hjzheng/CU...
The index.ejs page in the views directory has the usage of ng-file-upload
Please tell me how to compress images using this plug-in?