【问题标题】:Fineuploader IE9 CORS iframe error "object doesn't support property or method '_parseJsonResponse'Fineuploader IE9 CORS iframe 错误“对象不支持属性或方法'_parseJsonResponse'
【发布时间】:2014-10-19 03:32:30
【问题描述】:

对基于您的示例的 Java 服务器堆栈使用 Fineuploader 5.0.3。

所有上传都可以在 Firefox、Chrome、IE 10 及更高版本中正常运行。这似乎只发生在 IE 9 或更低版本中。我已经在不同环境的多台机器上进行了测试,结果相同。

以下是 IE9 上会话的调试日志:

[Fine Uploader 5.0.3] Received 1 files or inputs.
[Fine Uploader 5.0.3] Sending simple upload request for 0
[Fine Uploader 5.0.3] Sending upload request for 0
[Fine Uploader 5.0.3] Received iframe load event for CORS upload request (iframe name 0_3da0a2e3-33f1-46a0-a172-cec58610a2a1)
[Fine Uploader 5.0.3] Received the following window message: '{"success": true, "uuid":"23763c4a-e282-4c03-9d7d-c863d307755d", "auth":"12345", "objectid":"1076"}'
SCRIPT438: Object doesn't support property or method '_parseJsonResponse'
File: fineuploader.js, Line: 4799, Column: 17
[Fine Uploader 5.0.3] No valid message received from loaded iframe for iframe name 0_3da0a2e3-33f1-46a0-a172-cec58610a2a1
[Fine Uploader 5.0.3] iframe loaded
[Fine Uploader 5.0.3] Simple upload request failed for 0

我们将不胜感激。

【问题讨论】:

    标签: javascript internet-explorer cors fine-uploader cross-domain-policy


    【解决方案1】:

    这似乎是 5.0.0 中的回归。我已经提交了a bug in the project's issue tracker 并安排了 v5.0.5 的修复。

    一个快速的解决方法是更改​​此行:

    response = handler._parseJsonResponse(fileId, message),
    

    到这里:

    response = qq.parseJson(message);
    

    在源代码中。但是,更好的长期修复(我们应该将其合并到即将发布的修补程序版本中)涉及反转 the commit where we moved around the function that delegates to qq.parseJson for form-based uploads

    【讨论】:

    • 感谢此解决方法只需稍作修改即可完美运行。更新后的行尾应该有逗号,而不是分号。
    • 是的,听起来不错。我发帖前没有测试。这将在 5.0.5 中修复。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2013-04-23
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多