I have List of images. and i need to upload that list of images from server using dio. and also need to upload using MultipartFile.fromFile in dio.
so, how can i upload it ?
'document': await MultipartFile.fromFile(file[index].path),
i try this…
for (int index = 0; index < file.length; index++)
'document': await MultipartFile.fromFile(file[index].path),
but it’s not working. they upload only one image from list.
so is there any other way to upload list of images from server using dio flutter ?
2
Answers
You can try by following code:
Inside your upload method: