$.each(Product_Additional_Images, function(index, file) {
var Product_Sort_No = "1";
fileData.append("Product_Additional_Images[" + index + "][Image]", file.files[0]);
fileData.append("Product_Additional_Images[" + index + "][Sort_No]", Product_Sort_No);
});
即使用
Product_Additional_Images[{index}]
而不仅仅是
Product_Additional_Images[]
更新
如果你想发送
Image
$.each(Product_Additional_Images, function(index, file) {
var Product_Sort_No = "1";
//fileData.append("Product_Additional_Images[" + index + "][Image]", file.files[0]);
$.each(file.files, function(){
fileData.append("Product_Additional_Images[" + index + "][Image][]", this);
});
fileData.append("Product_Additional_Images[" + index + "][Sort_No]", Product_Sort_No);
});
然后在PHP中,
$_FILES['Product_Additional_Images']['tmp_name'][0]['Image']
例如,将是一个文件数组(或临时文件)。