title: Upload array of images to server
body: <p>I am having array of image to upload to sever when i upload  a set of images its uploading last image only how can i solve this,</p>
  
  <pre><code>  void uploads() async
  {
  var multipartFile;
  var uri = Uri.parse( Config.URL + "Posts/Cube_Post_Submit");
  var request = new http.MultipartRequest("POST", uri);
  for(int i=0;i&lt;image.length;i++)
  {
    print(image[i]);
    var stream = new 
   http.ByteStream(DelegatingStream.typed(image[i].openRead()));
    var length = await image[i].length();
    multipartFile  = new http.MultipartFile('attachments', stream, length,
        filename: basename(image[i].path));
  }   request.files.add(multipartFile);
  
  request.fields['User_Id'] = Config.USER_ID;
  request.fields['Cubes_Id'] = jsonstring;
  request.fields['Post_Text'] =  "hello";
  request.fields['Post_Category'] = "Story";
  request.fields['Post_Link'] = "";
  var response = await request.send();
  print(response.statusCode);
  response.stream.transform(utf8.decoder).listen((value)
  {
    print(value);
  });
  }
  </code></pre>