[英]Modifying blueimp jquery uploader
我正在修改此代碼,以便在我的php網站中使用。 我將代碼添加到了index.php中 ,但是我不知道在哪里添加Client-side file upload initialization:
代碼的一部分?
這是我用來使上載器插入mysql db的代碼。
客戶端文件上傳初始化:
$('#fileupload').fileupload({
url: 'server/php/'
}).on('fileuploadsubmit', function (e, data) {
data.formData = data.context.find(':input').serializeArray();
});
在文件main.js中,為下面的舊代碼添加注釋
/*
// Initialize the jQuery File Upload widget:
$('#fileupload').fileupload({
// Uncomment the following to send cross-domain cookies:
//xhrFields: {withCredentials: true},
url: 'server/php/'
});
*/
添加新代碼:
$('#fileupload').fileupload({
url: 'server/php/'
}).on('fileuploadsubmit', function (e, data) {
data.formData = data.context.find(':input').serializeArray();
});
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.