duanbiyi7319 2014-05-24 05:08 采纳率: 100%
浏览 77

修改blueimp jquery上传器

I'm modifying this code in order to use in my php web. I added the code to my index.php , but I don't know where to add the Client-side file upload initialization: part of the code ?

Here is the codes which I used inorder to make uploader inserts into mysql db.

Client-side file upload initialization:

$('#fileupload').fileupload({
    url: 'server/php/'
}).on('fileuploadsubmit', function (e, data) {
    data.formData = data.context.find(':input').serializeArray();
});
  • 写回答

1条回答 默认 最新

  • douquan3294 2014-08-21 20:48
    关注

    in file main.js for old code below add comment

    /* 
        // Initialize the jQuery File Upload widget:
        $('#fileupload').fileupload({
            // Uncomment the following to send cross-domain cookies:
            //xhrFields: {withCredentials: true},
            url: 'server/php/'
        });
    */
    

    add new code:

    $('#fileupload').fileupload({
        url: 'server/php/'
        }).on('fileuploadsubmit', function (e, data) {
         data.formData = data.context.find(':input').serializeArray();
    });
    
    评论

报告相同问题?