当队列为空时,pluploader-uploader.start()会导致javascript错误

plupload - uploader.start() results in javascript error when queue is empty

本文关键字:错误 javascript start 队列 pluploader-uploader      更新时间:2023-09-26

在选择任何文件之前调用uploader.start()会导致plupload出错。例如,如果您查看plupload 1.5.2中的example/custom.html,然后首先单击"Upload files"按钮,则会得到一个javascript错误:

q是未定义的

如果你在网站上看这个例子,它是有效的,因为网站上使用的脚本"/pulpload/js/pulpload.full.js"与上次发布的版本(1.5.2)不同。但如果你使用1.5.2最新发布的版本,就会出现上述问题。

plupload 1.5.2有什么变通办法吗

编辑:问题已报告。

找到了一个解决方法:

if (uploader.files.length > 0)
    uploader.start()