swf上传+ jQuery:upload_complete_handler 未触发
我试图将完成事件分配给 swfupload 的 upload_complete_handler,不幸的是没有任何反应。
在我的设置中,我有:
upload_complete_handler : function(){
alert("finished");
}
所有参数似乎都正确,我已经尝试停用我的上传脚本。知道可能出什么问题吗?
I'm trying to assign a done-event to the upload_complete_handler for swfupload, unfortunately nothing happens.
In my settings I have:
upload_complete_handler : function(){
alert("finished");
}
All parameters seem correct, I've already tried deactivating my upload script. Any idea what could be wrong?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我一直在寻找在所有上传完成后重定向的东西。根据你的问题,这立即可以正常工作。因此,除了处理程序类型之外,此代码是可以的 -
queue_complete_handler 适用于所有文件完成后。
...
upload_success_handler :上传成功,
upload_complete_handler :上传完成,
queue_complete_handler : function(){window.location.href="/your address";}
I had been looking for something to redirect after all upload complete. And based on your question this works fine immediatelly. So this code is OK except handler type -
queue_complete_handler is after all files complete.
...
upload_success_handler : uploadSuccess,
upload_complete_handler : uploadComplete,
queue_complete_handler : function(){window.location.href="/your address";}
我相信您必须渲染一些内容(输出一些文本/HTML,甚至不输出任何内容,至少有 200 成功响应)才能触发
upload_complete_handler
。您正在输出任何内容还是只是对文件执行某些操作?I believe that you have to render something (output some text/HTML or even nothing with at least a 200 Success response) for the
upload_complete_handler
to fire. Are you outputting anything or are you just doing something with the file?