Krajee 引导程序文件输入 maxFileCount of Images.
Krajee Bootstrap File Input maxFileCount of Images
我正在使用Krajee的Bootstrap File Input。
http://plugins.krajee.com/file-input
我完成了将图像放入该输入字段,因此该字段显示我输入的文件/图像。
现在我尝试再放几张图片并更改参数
最大文件计数
从 1 到 20,
我没有收到任何错误,但输入字段只显示一张图像,
有谁知道如何解决这个问题?
代码如下所示:
<div class="form-group">
<label for="LogoImage">pick images</label>
<input id="input-imgs" name="input-image" type="file" class="file-loading" accept="image/*">
<div id="kv-success-modal" class="modal fade">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
<h4 class="modal-title">Success!</h4>
</div>
<div id="kv-success-box" class="modal-body"></div>
</div>
</div>
</div>
</div>
还有javascript(jquery):
$("#input-imgs").fileinput({
uploadUrl: "/site/image-upload",
allowedFileExtensions: ["jpg", "png", "jpeg"],
allowedFileTypes: ['image'],
maxImageWidth: 1000,
maxFileCount: 20,
resizeImage: true
}).on('filepreupload', function() {
$('#kv-success-box').html('');
}).on('fileuploaded', function(event, data) {
$('#kv-success-box').append(data.response.link);
$('#kv-success-modal').modal('show');
});
它
现在可以工作了,我刚刚添加的非常简单
多色
在 HTML 中。
所以行改为:
<input id="input-imgs" name="input-image" type="file" multiple class="file-loading" accept="image/*">
相关文章:
- HighChart : Usage of setData
- document.images未加载在chrome或firefox上,但已加载在IE上
- Difference between methods of defining JavaScript 'class
- 为什么我在下面的..of循环中得到意外令牌
- Appending the innerhtml of <th>
- Animation cuts off multiple lines of text in <p>
- javascript: functionname() instread of functionname()
- jQuery使用.of()删除事件处理程序时出现的问题
- Three.js issue creating meshes outside of loader's load(
- jquery in the middle of html
- JavaScript equivalent of C#'s DynamicObject?
- nodejs console.log of object
- value of jquery sortable
- Javascript imageData returns array of 0's
- 对于grunt构建中的(let.of)错误
- Opposite of jQuery's :eq()
- Implementation of jQuery 'animate' with Meteor
- 当调用.of()然后调用.on()时,Jquery是否可能将事件推迟
- javascript number of images
- Krajee 引导程序文件输入 maxFileCount of Images.