flutter dio how to upload multiple files ,only keep one when upload multiple files?
Irder外贸平台,个人免费入驻 https://www.irder.com
flutter dio how to upload multiple files ,only keep one when upload multiple files?
we can get the answer from
it seems work ok before ,but when i upload multiple files ,it can only keep the last one,
finally i get the answer, rename the MapEntry name to array,it is ok now
var formData = FormData();
for (var file in filepath) {
formData.files.addAll([
MapEntry("assignment[]", await MultipartFile.fromFile(file)),
]);
}
评论
登陆评论
没有评论