I'm just implementing the Jquery Uploadify-Plugin to my Site. 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). No connection is displayed in Firebug, probably because of the flash application. 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',
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.