0
私はAjax Uploadを使って、ajaxとphpを介してファイルをアップロードしています。 /upload
のURLでajaxuploadを使用して画像をアップロード
$(document).ready(function() {
if ($('#uploadExists').length) {
var btnUpload = $('#uploadExists');
var u = new AjaxUpload(btnUpload, {
action: '/upload',
name: 'fname',
onSubmit: function(file, ext){
if (! (ext && /^(jpg|png|jpeg|gif)$/.test(ext))) {
//Bad file
return false;
}
},
onComplete: function(file, response){
if (! (/(\.jpg|\.png|\.jpeg|\.gif)/.test(response))) {
//Bad file
console.log(response);
return false;
} else {
console.log(response);
}
}
});
}
});
は私が何をすべき: でのjsファイルは、私は、次のコード行を書きましたか? 私は事を書いていますPHP.