1 week ago

how to send image file with serialize from data via ajax

Posted 1 week ago by jeevamugunthan

my code is

    function paymake(id){
        var dataimg = new FormData();
        var files = $('#img_proof')[0].files[0];
            url: "{{ route('paymake') }}",
            method: 'post',
            data:$('#multi_pay').serialize() +" &dataimg="+dataimg+ "&_token={{csrf_token()}}",
            success: function(data){



i got result in header like

dataimg=[object FormData]

anybody know this

Please sign in or create an account to participate in this conversation.