繁体   English   中英

Uploadify 400错误请求

[英]Uploadify 400 Bad Request

我只是将Jquery Uploadify-Plugin实施到我的网站。 这是代码:

$('#uploadbtn').uploadify({
    'debug'    : true,
    'fileTypeDesc' : imagestxt,
    'removeCompleted' : false,
    'uploadLimit' : 40,
    'auto'     : false,
    'queueID'  : 'uploadqueue',
    'fileTypeExts' : '*.jpg; *.jpeg; *.png; *.gif', 
    'buttonClass' : 'uploadbtn',
    'fileSizeLimit' : '5MB',
    'buttonText' : uploadbtntext,
    'swf'      : '../../js/uploadify.swf',
    'uploader' : '../../actions/upload.php',
    'width' : '200',
    'method'   : 'post',
    'onDialogClose'  : function(queueData) {
       if (queueData.queueLength > 0) 
       {
            $(".uploadinstructions").hide();
            $(".albumoptions").show();
            $("#startupload").removeAttr("disabled");
            $(document).blur();
       }
    },
    'onUploadSuccess' : function(file, data, response) {
    alert('The file was saved to: ' + data);
    },
    'onUploadComplete' : function(file) {
        $("#startupload").removeAttr("disabled");
    },
    'onComplete' : function (event, queueID, fileObj, response, data) {
        alert(response);
    }
});

问题是,当我上传文件时,在弹出窗口中显示一条错误消息,提示(400错误请求)。 Firebug中未显示任何连接,可能是由于Flash应用程序所致。 有什么想法,如何解决呢?

我自己找到了答案,这很愚蠢又容易,我只需要更改一下即可:

'swf'      : '../../js/uploadify.swf',
'uploader' : '../../actions/upload.php',

对此:

'swf'      : '../js/uploadify.swf',
'uploader' : '../actions/upload.php',

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM