简体   繁体   English

Uploadify 400错误请求

[英]Uploadify 400 Bad Request

I'm just implementing the Jquery Uploadify-Plugin to my Site. 我只是将Jquery Uploadify-Plugin实施到我的网站。 Here's the code: 这是代码:

$('#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);
    }
});

The problem is, when I'm uploading a file, I get an error message in a popup which says (400 Bad Request). 问题是,当我上传文件时,在弹出窗口中显示一条错误消息,提示(400错误请求)。 No connection is displayed in Firebug, probably because of the flash application. Firebug中未显示任何连接,可能是由于Flash应用程序所致。 Any ideas, how to solve this? 有什么想法,如何解决呢?

I just found the answer myself, it was pretty stupid and easy, i simply had to change this: 我自己找到了答案,这很愚蠢又容易,我只需要更改一下即可:

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

to this: 对此:

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

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

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