Insert and move multiple images via jQuery AJAX in CodeIgniter [duplicate]
问题 This question already has answers here : How to insert and move multiple image using codeigniter? (3 answers) Closed 11 months ago . view: $("#submit").on('click',function(e){ e.preventDefault(); product_name = $("#product_name").val(); category = $("#category").val(); var formData = new FormData(); $.each($("#product_image"), function (i, obj) { $.each(obj.files, function (j, file) { formData.append('product_image[' + i + ']', file); }); }); formData.append('product_name', product_name);