上传上传文件

时间:2013-04-30 10:21:01

标签: uploadify

Uplodify在firefox中不起作用,它会产生HTTP:403错误。我无法追查问题。它在Chrome中运行良好。但是没有在firefox中工作。以下是我的代码

<script src="../Skills4Project/js/jquery-1.6.4.min.js" type="text/javascript"></script>
<script src="jquplodify/jquery.uploadify.v2.1.4.min.js" type="text/javascript"></script>
<script src="jquplodify/swfobject.js" type="text/javascript"></script>


      $('#imageUpload').uploadify({
                    'uploader': 'jquplodify/uploadify.swf',
                    'script': '/_layouts/Skills4Project.FreelancerProfile/UploadProfileImageInList.aspx?uid=' + $("#<%= hdnPUserId.ClientID %>").val(),
                    'cancelImg': 'jquplodify/images/cancel.png',
                    'fileExt': '*.jpg;*.gif;*.png',
                    'fileDesc': 'Image Files (.JPG, .GIF, .PNG)',
                    'multi': false,
                    'auto': false,
                    'buttonText': 'Browse',
                    'queueID': 'custom-queue',
                    'queueSizeLimit': 8,
                    'simUploadLimit': 1,
                    'removeCompleted': false,
                    'onSelectOnce': function (event, data) {



                    },
                    'onComplete': function (event, ID, fileObj, response, data) {
                        if (response == "Failed") {
                            $("#imageUpload" + ID).find(".cancel").html("<img src='jquplodify/images/inactive.png' alt='fail' />");
                            $('#imageUpload' + ID).addClass('uploadifyError');
                            $('#imageUpload' + ID + ' .percentage').text(' - Upload Error');
                            return false;
                        }
                        else {

                            $("#imageUpload" + ID).find(".cancel").html("<img src='jquplodify/images/active.png' alt='done' />");
                            $("#dvSliderImages").css("display", "block");
                            window.__doPostBack("<%=btnImageRefresh.UniqueID%>", "");
                        }
                    },
                    'onCancel': function (event, ID, fileObj, data) {

                    },
                    'onAllComplete': function (event, data) {


                    },
                    'onError': function (event, ID, fileObj, errorObj) {
                        alert(errorObj.type + ' Error: ' + errorObj.info);
                    },
                    'onFallback': function () {
                        alert('Flash was not detected or flash version is not supported.');
                    }
                });

此外,如果未在浏览器中安装Flash,我还想显示消息。我怎样才能做到这一点?在IE和Firefox中,如果没有安装flash,则浏览按钮不显示

此致 普里亚

0 个答案:

没有答案