簡體   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