看看官方的API,上传完了之后是有回调函数的,你可以在回调函数里再发个请求:
<!--ready事件-->
<script type="text/javascript">
$(document).ready(
function() {
$("#uploadify").uploadify(
{
'uploader' : 'uploadify/uploadify.swf',
'script' : 'fileUpload.html;jsessionid=<%=session.getId()%>',//后台处理的请求
'cancelImg' : 'images/cancel.png',
'folder' : 'uploads',//您想将文件保存到的路径
'queueID' : 'fileQueue',//与下面的id对应
'queueSizeLimit' : 5,
'fileDataName' : 'uploadify',
'fileDesc' : '视频、图像、文本文件',
/*
'fileExt' : '*.BMP;*.JPG;*.JPEG;*.PNG;*.GIF;'+
'*.AVI;*.WMV;*.FLV;*.MKV;*.MOV;*.3GP;*.MP4;*.MPG;*.MPEG;*.RM;*.RMVB;*.TS;*.SWF;'+
'*.MP3;*.WAV;*.WMA;*.MID;*.MKA;*.WV;'+
'*.TXT',
*/
'fileExt' : '*.BMP;*.JPG;*.PNG;*.GIF;'+
'*.MP4;*.MPEG;*.MPG;'+
'*.TXT',
'auto' : false,
'multi' : true,
'simUploadLimit' : 2,
'buttonText' : 'BROWSE',
'onError' : function(event, ID, fileObj, errorObj) {
alert(errorObj.type + ' Error: '+ errorObj.info);
},
'onSelect' : function(e, queueId, fileObj) {
if(fileObj.name.length > 50){
alert("文件名长度(包括后缀)不能超过50个英文字符(一个中文字符占2个英文字符),请重命名后重新选择,否则将无法使用此文件!");
//$("#uploadify").uploadify("cancel","*");
}
},
'onAllComplete' : function(event,data) {
alert(data.filesUploaded + '个文件上传成功,'+"平均上传速度为:"+data.speed+"KB/s,"+"上传文件的总大小为:"+data.allBytesLoaded+"KB" );
}
});
});
</script>