concrete5 - how to get files uploaded through ajax in php
问题 I'm trying to upload multiple files through ajax but I can't figure out how to get the uploaded files in PHP. I sent them var attachments = $('.attachment-file'); var post_data = new FormData(); if (attachments.length > 0) { attachments.each(function(i, v) { post_data.append('my_file', $(v)[0].files); }); } $.ajax({ cache: false, contentType: false, processData: false, method: 'post', type: 'post', data: post_data, url: form.attr('action'), }) .done(function(response) { ... but when I try to