我正在修改这段代码,以便在我的php web中使用。我将代码添加到我的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();
});发布于 2014-08-21 20:48:38
在文件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();
});https://stackoverflow.com/questions/23841514
复制相似问题