Answers for "file upload in jquery"

2

file upload in jquery

$(function(){
    $('#uploadBTN').on('click', function(){ 
        var fd = new FormData($("#fileinfo"));
        //fd.append("CustomField", "This is some extra data");
        $.ajax({
            url: 'upload.php',  
            type: 'POST',
            data: fd,
            success:function(data){
                $('#output').html(data);
            },
            cache: false,
            contentType: false,
            processData: false
        });
    });
});
Posted by: Guest on May-27-2021

Code answers related to "file upload in jquery"

Code answers related to "Javascript"

Browse Popular Code Answers by Language