swf上传+ jQuery:upload_complete_handler 未触发

发布于 2024-09-27 08:39:52 字数 219 浏览 2 评论 0原文

我试图将完成事件分配给 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

┼── 2024-10-04 08:39:52

我一直在寻找在所有上传完成后重定向的东西。根据你的问题,这立即可以正常工作。因此,除了处理程序类型之外,此代码是可以的 -

  • upload_complete_handler 适用于每个文件(上传后),
  • 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 -

  • upload_complete_handler is for every file (after upload),
  • 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";}

迷爱 2024-10-04 08:39:52

我相信您必须渲染一些内容(输出一些文本/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?

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文