2
我使用jQuery文件上傳插件(基本版本)https://github.com/blueimp/jQuery-File-Upload上傳文件在後臺與carrierwave
和rails3
。jquery文件上傳只提交文件而不是整個表格數據
<script type="text/javascript">
//auto upload files on change event
$(function(){
$("form input[type='file']").fileupload({
dataType: 'script',
add: function (e, data) {
data.submit();
},
done: function (e, data){
},
});
});
</script>
但data.submit()
方法提交整個表單數據與需要被上傳,因爲性能被認爲這是我的應用程序的一個大問題文件一起。
如果有人遇到這個問題,請幫助我。
爲什麼要投票? –