In fact, there should be multiple uploads on the iOS side, because I usually use AFN. I will only explain the situation of AFN. When AFN uploads pictures, there will be a timestamp spliced there. As long as the keys are different. filename 和 name,name为服务器规定的字段,filename为图片名称,因为上传的list内部是键值对的形式,当filename为同一个名字的时候,服务器在接收多个键值对的时候,会出现因为键相同而覆盖之前的值的,所以后台接收了之后只是接收了最后一个。可以跟iOS端交流交流,看看让他在filename那里拼接一个时间戳或者在name
The backend uses CommonsMultipartResolver to receive, and ios uses MultipartHttpServletRequest to process the stream.
In fact, there should be multiple uploads on the iOS side, because I usually use AFN. I will only explain the situation of AFN. When AFN uploads pictures, there will be a timestamp spliced there. As long as the keys are different.
filename
和name
,name
为服务器规定的字段,filename
为图片名称,因为上传的list内部是键值对的形式,当filename
为同一个名字的时候,服务器在接收多个键值对的时候,会出现因为键相同而覆盖之前的值的,所以后台接收了之后只是接收了最后一个。可以跟iOS端交流交流,看看让他在filename
那里拼接一个时间戳或者在name