app.post('/uploadFile’,function(req,res){ var form = new formidable.IncomingForm(),randomId,searchForm; var count = 0; randomId = req.body.randomId; searchForm = searchQueueById.searchFormQueueById(randomId,globalForm); if(searchForm){ searchForm.on('progress’,function(bytesReceived,bytesExpected,ending){ count++; if(count%50 === 0){ res.send({bytesReceived:bytesReceived,bytesExpected:bytesExpected,ending:ending,flag:true}); }else{ res.send({flag:false,ending:ending}); } }); }else{ res.send({flag:true}); } }); 首先iframe上传提交,我用ajax定时去取文件内容,为什么我这个progress事件没有执行。
作者
作者其它话题