我正在使用带有ajaxupload.js的jasny bootstrap文件上传。
http://jasny.github.io/bootstrap/javascript.html#fileupload
我使用了以下代码。当我点击选择文件时,它会在输入div中显示它。
但是当我点击提交然后尝试选择元素时,它没有在输入div中显示名称
这是一个小提琴:http://jsfiddle.net/Ffkj6/
<form method="post" id="uploadform" enctype="multipart/form-data">
<div id="upload-adm" class="fileupload fileupload-new" data-provides="fileupload">
<div class="input-append">
<div class="uneditable-input span3" style="height:20px;">
<i class="icon-file fileupload-exists"></i>
<span class="fileupload-preview"></span>
</div>
<span class="btn btn-file">
<span class="fileupload-new">Select file</span>
<span class="fileupload-exists">Change</span>
<input type="file" name="file" id="file"/>
</span>
<a href="#" class="btn fileupload-exists" data-dismiss="fileupload">Remove</a>
<input type="submit" name="submit" value="Upload" class="btn adm-file-btn">
</div>
</div>
</form>