php – 在Chrome中Uploadify返回Aw,Snap页面

从最后更新的chrome(版本36.0.1985.125 m)我有uplodify插件/闪存的问题. Chrome显示Aw,Snap页面或有时他死了,Jim!这是我的uplodify代码:
<input type="file" name="file_upload" id="file_upload_50">
<script type="text/javascript">
var basePath = "path to ressources";
var errorMessage = "Error Message";
var allowExts = "*.pdf; *.xls; *.xlsx; *.rar; *.zip";
$(document).ready(function() {
    var is_error = false;
    $('#file_upload_50').uploadify({
        'swf': basePath + '/uploadify/uploadify.swf','uploader': "uploader.php",'height': 25,'buttonText': "Upload",'fileTypeExts': allowExts,'fileTypeDesc': "Formats:" + allowExts,'formData': {
            'user_id': 50,'company_id': 1
        },'onUploadError': function(file,errorCode,errorMsg,errorString) {
            alert(errorMessage);
            is_error = true;
        },'onUploadSuccess': function(file,data,response) {
            var result = $.parseJSON(data);
            if (!result.result) {
                alert(result.error_msg);
                is_error = true;
            }
        },'onQueueComplete': function(queueData) {
            if (!is_error) {
                document.location.href = "result_page.html";
            }
        }
    });
});
</script>

哪里有问题?你能给我一些建议吗我很无奈谢谢

我发现添加一个setTimeout来修复这个.这表示Chrome / Chrome的Flash实施/ Uploadify的Flash应用程序中的竞争条件,其中的情况并不明确.尽管如此,它似乎在所有情况下都适用于我们的用例.
$(document).ready(function () {
    setTimeout(function () {
        $('foo').uploadify({...});
    },0);
});

这不是一个很好的答案,但是在没有解决方案的情况下,这是一个可用的解决方法.

相关文章

统一支付是JSAPI/NATIVE/APP各种支付场景下生成支付订单,返...
统一支付是JSAPI/NATIVE/APP各种支付场景下生成支付订单,返...
前言 之前做了微信登录,所以总结一下微信授权登录并获取用户...
FastAdmin是我第一个接触的后台管理系统框架。FastAdmin是一...
之前公司需要一个内部的通讯软件,就叫我做一个。通讯软件嘛...
统一支付是JSAPI/NATIVE/APP各种支付场景下生成支付订单,返...