打开 touch/forum/post.htm 模板,查找:- <input type="file" name="Filedata" id="filedata"
复制代码 替换为:- <input type="file" name="Filedata" id="filedata" multiple="multiple"
复制代码 查找:- $.buildfileupload({
- uploadurl:'misc.php?mod=swfupload&operation=upload&type=image&inajax=yes&infloat=yes&simple=2',
- files:this.files,
- uploadformdata:{uid:"$_G[uid]", hash:"<!--{eval echo md5(substr(md5($_G[config][security][authkey]), 8).$_G[uid])}-->"},
- uploadinputname:'Filedata',
- maxfilesize:"$swfconfig[max]",
- success:uploadsuccess,
- error:function() {
- popup.open('{lang uploadpicfailed}', 'alert');
- }
- });
复制代码 替换为:- for (var i=0;i<this.files.length;i++ ) {
- var file_data = [];
- file_data.push(this.files[i]);
- $.buildfileupload({
- uploadurl:'misc.php?mod=swfupload&operation=upload&type=image&inajax=yes&infloat=yes&simple=2',
- files:file_data,
- uploadformdata:{uid:"$_G[uid]", hash:"<!--{eval echo md5(substr(md5($_G[config][security][authkey]), 8).$_G[uid])}-->"},
- uploadinputname:'Filedata',
- maxfilesize:"2000",
- success:uploadsuccess,
- error:function() {
- popup.open('上传失败,请稍后再试!', 'alert');
- }
- });
- }
复制代码 上传覆盖,更新缓存。 |