Open zhuyihao opened 8 years ago
var uploader; $(document).ready(function() { uploader = WebUploader.create({ swf: '/assets/js/Uploader.swf', server: '/test.php', pick: '#picker', resize: false }); uploader.on( 'fileQueued', function( file ) { $("#thelist").append( '<div id="' + file.id + '" class="item">' + '<h4 class="info">' + file.name + '</h4>' + '<p class="state">等待上传...</p>' + '</div>' ); }); uploader.on('uploadSuccess', function( file ) { $( '#'+file.id ).find('p.state').text('已上传'); }); $("#ctlBtn").click(function(){ uploader.upload(); }); });
duplicate {Boolean} [可选] [默认值:undefined]
去重, 根据文件名字、文件大小和最后修改时间来生成hash Key.
我也遇到这个问题,太奇怪了,第二次调用uploader.upload() 就失效。 duplicate 已经配了true的,换成false也一样